From 8d80e0a46e825bf54ae1709fb73315d6d8723931 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 24 Feb 2024 08:45:44 -0500 Subject: [PATCH] Parsing cleanup --- src/engine/objects/ItemTemplate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 9da473e2..28241aa0 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -134,7 +134,8 @@ public class ItemTemplate { 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(); + if (jsonObject.containsValue("item_defense_rating")) + item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue(); JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");