diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index c9fcd5c7..945aa9d0 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -107,8 +107,8 @@ public class ItemTemplate { Object skills_used = jsonObject.get("item_skill_used"); - if (skills_used.equals(0) == false) - for (Object o : (JSONArray) skills_used) { + if (((JSONObject) jsonObject.get("item_skill_used")).containsValue(0) == false) + for (Object o : (JSONArray) jsonObject.get("item_skill_used")) { String skilString = ((String) o).replaceAll("\\s", ""); Enum.CharacterSkills characterSkill = Enum.CharacterSkills.valueOf(skilString); item_skill_used.add(characterSkill);