From e9d5c3db0ee6937228600af8f9206c91e523e3b6 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 24 Feb 2024 15:34:16 -0500 Subject: [PATCH] Weapon field parsing --- src/engine/objects/ItemTemplate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index ca866857..2ad79448 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -165,7 +165,7 @@ public class ItemTemplate { item_weapon_projectile_speed = ((Double) item_weapon.get("weapon_projectile_speed")).floatValue(); item_weapon_combat_idle_anim = ((Long) item_weapon.get("weapon_combat_idle_anim")).intValue(); - JSONObject weapon_damage = (JSONObject) jsonObject.get("weapon_damage"); + JSONObject weapon_damage = (JSONObject) item_weapon.get("weapon_damage"); item_weapon_damage_type = Enum.DamageType.valueOf((String) weapon_damage.get("damage_type")); item_weapon_damage_min = ((Long) weapon_damage.get("damage_min")).intValue(); item_weapon_damage_max = ((Long) weapon_damage.get("damage_max")).intValue();