diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index a602eb23..12bfb4b7 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -139,13 +139,12 @@ public class ItemTemplate { item_parry_anim_id = ((Long) jsonObject.get("item_parry_anim_id")).intValue(); - // Item Type == ARMOR? + // Fields only present for ARMOR - if (jsonObject.containsValue("item_bulk_factor")) + if (item_type.equals(Enum.ItemType.ARMOR)) { item_bulk_factor = ((Double) jsonObject.get("item_bulk_factor")).floatValue(); - - if (jsonObject.containsValue("item_defense_rating")) item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue(); + } JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");