From b9507381ed91ffdeac2791458b1da15efd336458 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 18 Feb 2024 15:05:54 -0500 Subject: [PATCH] More constructor work. --- src/engine/objects/ItemTemplate.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 9c3064f1..ab20b087 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -107,7 +107,8 @@ public class ItemTemplate { Object skills_used = jsonObject.get("item_skill_used"); - if (skills_used != null) - item_skill_used.add(Enum.CharacterSkills.Axe); + if (skills_used instanceof JSONArray) + for (Object o : (JSONArray) skills_used) + item_skill_used.add(Enum.CharacterSkills.valueOf((String) o)); } }