From d5eab7f17ddc635d1d29fca7c19646056aa9c49e Mon Sep 17 00:00:00 2001 From: DelvalletQuentin Date: Fri, 13 Mar 2015 14:39:03 +0100 Subject: [PATCH] Bug fix Fixed inverted min/max values in the NPC parser. --- src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java index d75db0a..68e5744 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java +++ b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java @@ -189,12 +189,12 @@ public class NPC extends JSONElement { if (hitEffect != null) { this.hit_effect = new HitEffect(); if (hitEffect.get("increaseCurrentHP") != null) { - this.hit_effect.hp_boost_max = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentHP")).get("min"))); - this.hit_effect.hp_boost_min = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentHP")).get("max"))); + this.hit_effect.hp_boost_max = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentHP")).get("max"))); + this.hit_effect.hp_boost_min = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentHP")).get("min"))); } if (hitEffect.get("increaseCurrentAP") != null) { - this.hit_effect.ap_boost_max = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentAP")).get("min"))); - this.hit_effect.ap_boost_min = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentAP")).get("max"))); + this.hit_effect.ap_boost_max = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentAP")).get("max"))); + this.hit_effect.ap_boost_min = JSONElement.getInteger((Number) (((Map)hitEffect.get("increaseCurrentAP")).get("min"))); } List conditionsSourceJson = (List) hitEffect.get("conditionsSource"); if (conditionsSourceJson != null && !conditionsSourceJson.isEmpty()) {