Browse Source

Wrapped in armor test

combat-2
MagicBot 9 months ago
parent
commit
704375099b
  1. 7
      src/engine/objects/ItemTemplate.java

7
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_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(); 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(); item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue();
}
JSONArray itemflags = (JSONArray) jsonObject.get("item_flags"); JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");

Loading…
Cancel
Save