From 37fec6946299b5558fc70731590964f6644e907d Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 24 Feb 2024 08:42:19 -0500 Subject: [PATCH] Parsing cleanup --- src/engine/objects/ItemTemplate.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index a41721b7..9da473e2 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -130,7 +130,10 @@ public class ItemTemplate { } item_parry_anim_id = ((Long) jsonObject.get("item_parry_anim_id")).intValue(); - item_bulk_factor = ((Double) jsonObject.get("item_bulk_factor")).floatValue(); + + if (jsonObject.containsValue("item_bulk_factor")) + item_bulk_factor = ((Double) jsonObject.get("item_bulk_factor")).floatValue(); + item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue(); JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");