From 415ec5f5d457a59c2cb9cf1f4a5352a41659a9dc Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 28 Mar 2024 20:47:29 -0500 Subject: [PATCH] array list cast for canRoll --- src/engine/objects/NPC.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 507f51a1..819a7171 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -1067,7 +1067,8 @@ public class NPC extends AbstractCharacter { ItemTemplate itemTemplate; for (Integer itemID : fullItemList) { itemTemplate = ItemTemplate.templates.get(itemID); - boolean exclude = (int)itemTemplate.item_skill_required.values().toArray()[0] == 0 && ItemTemplate.templates.get(itemID).item_type == ItemType.WEAPON; + int[] skillsRequired = (int[]) itemTemplate.item_skill_required.values().toArray()[0]; + boolean exclude = skillsRequired[0] == 0 && ItemTemplate.templates.get(itemID).item_type == ItemType.WEAPON; if ((int)itemTemplate.item_skill_required.values().toArray()[0] <= maxSkill && !exclude) filteredItemList.add(itemID); }