From 04243cc21e745125346284ac3a8263fd725b3c4b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Apr 2024 14:27:07 -0400 Subject: [PATCH] Arraylists of ints --- src/engine/objects/ItemTemplate.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index c581ed49..50b4b4ff 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -129,6 +129,8 @@ public class ItemTemplate { public final HashMap rune_skill_adj = new HashMap<>(); public final EnumSet rune_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); public final EnumSet rune_not_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); + public final ArrayList rune_groupee_monster_types = new ArrayList<>(); + public final ArrayList rune_helper_monster_types = new ArrayList<>(); public ItemTemplate(JSONObject jsonObject) { @@ -511,6 +513,20 @@ public class ItemTemplate { rune_not_enemy_monster_types.add(monsterType); } + JSONArray groupee_types_json = (JSONArray) jsonObject.get("rune_groupee_monster_types"); + + for (Object o : groupee_types_json) { + int groupeeId = ((Long) o).intValue(); + rune_groupee_monster_types.add(groupeeId); + } + + JSONArray helper_types_json = (JSONArray) jsonObject.get("rune_helper_monster_types"); + + for (Object o : helper_types_json) { + int helperId = ((Long) o).intValue(); + rune_helper_monster_types.add(helperId); + } + rune_renderable = ((Boolean) jsonObject.get("rune_renderable")); rune_natural_power_attack = ((Long) jsonObject.get("rune_natural_power_attack")).intValue();