diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 31b98a6b..03468c49 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -177,13 +177,13 @@ public class ItemTemplate { // Reading offering data - JSONObject item_offering_info = (JSONObject) jsonObject.get("item_offering_info"); + JSONArray offering_data = (JSONArray) 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); + for (Object entry : offering_data) { + JSONObject offering_entry = (JSONObject) entry; + String offering_type = ((String) offering_entry.get("offering_type")).replaceAll("-", ""); + int offering_value = ((Double) offering_entry.get("offering_value")).intValue(); + item_offering_info.put(offering_type, offering_value); } // Fields only present for ARMOR