From 3f1f988808d638f3a8dd85d70a48f8d43c1143d2 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sat, 3 May 2025 19:27:43 +0200 Subject: [PATCH] fix missed null check --- src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java index da1fb19..c1357c0 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java +++ b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java @@ -183,9 +183,11 @@ public class NPC extends JSONElement { List conditionsTargetJson = (List) hitEffect.get("conditionsTarget"); this.hit_effect.conditions_target = parseTimedConditionEffects(conditionsTargetJson); } - + Map hitReceivedEffect = (Map) npcJson.get("Common.HitReceivedEffect"); - this.hit_received_effect = Common.parseHitReceivedEffect(hitReceivedEffect); + if (hitReceivedEffect != null) { + this.hit_received_effect = Common.parseHitReceivedEffect(hitReceivedEffect); + } Map deathEffect = (Map) npcJson.get("deathEffect"); if (deathEffect != null) {