diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 479e9cd7..159e0fc8 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -43,6 +43,8 @@ public class ItemTemplate { public int item_render_object_female; public float item_health_full; + public EnumSet item_skill_used = EnumSet.noneOf(Enum.CharacterSkills.class); + public ItemTemplate(JSONObject jsonObject) { // Reading a String @@ -103,5 +105,10 @@ public class ItemTemplate { item_render_object_female = ((Long) jsonObject.get("item_render_object_female")).intValue(); item_health_full = ((Double) jsonObject.get("item_health_full")).floatValue(); + JSONArray skills_used = (JSONArray) jsonObject.get("item_skill_used"); + + if (skills_used.isEmpty() == false) + for (Object o : eq_slots_or) + item_skill_used.add(Enum.CharacterSkills.valueOf((String) o)); } }