diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index ad3c699a..31b98a6b 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -49,10 +49,12 @@ public class ItemTemplate { public String item_dsc; public int item_render_object_female; public float item_health_full; - public int item_parry_anim_id; + public String item_skill_used = ""; public String item_skill_mastery_used = ""; + public int item_parry_anim_id; public float item_bulk_factor; + public HashMap item_offering_info = new HashMap<>(); public int item_defense_rating; public float item_weapon_wepspeed; public float item_weapon_max_range; @@ -173,6 +175,17 @@ public class ItemTemplate { item_parry_anim_id = ((Long) jsonObject.get("item_parry_anim_id")).intValue(); + // Reading offering data + + JSONObject item_offering_info = (JSONObject) jsonObject.get("item_offering_info"); + + for (Object key : item_offering_info.keySet()) { + String shrineType = (String) key; + shrineType = shrineType.replaceAll("-", ""); // For half-giant + int value = ((Double) item_offering_info.get(key)).intValue(); + item_offering_info.put(shrineType, value); + } + // Fields only present for ARMOR if (item_type.equals(Enum.ItemType.ARMOR)) {