diff --git a/src/engine/Enum.java b/src/engine/Enum.java index da309d5a..a6ab2532 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -2991,4 +2991,12 @@ public class Enum { EMPTY_NEWITEM; } + public enum AttributeType { + None, + Strength, + Dexterity, + Constitution, + Intelligence, + Spirit, + } } diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 16b47b70..eee1753a 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -57,8 +57,9 @@ public class ItemTemplate { public int item_weapon_projectile_id; public float item_weapon_projectile_speed; public int item_weapon_combat_idle_anim; - public HashMap item_weapon_damage = new HashMap<>(); + public Enum.AttributeType item_primary_attr = Enum.AttributeType.None; + public Enum.AttributeType item_secondary_attr = Enum.AttributeType.None; public EnumSet item_flags = EnumSet.noneOf(Enum.ItemFlags.class); public EnumSet item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class); public int item_initial_charges; @@ -204,6 +205,9 @@ public class ItemTemplate { int[] minMax = {min, max}; item_weapon_damage.put(sourceType, minMax); } + + item_primary_attr = Enum.AttributeType.valueOf((String) jsonObject.get("item_primary_attr")); + item_secondary_attr = Enum.AttributeType.valueOf((String) jsonObject.get("item_secondary_attr")); } JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");