From 6514fd8dc3f88ef754508ddd10597b28637bda0b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 27 Mar 2024 17:39:42 -0500 Subject: [PATCH] remove ItemBase from NPC --- src/engine/objects/NPC.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index bf3587a8..b8c9e195 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -1064,11 +1064,11 @@ public class NPC extends AbstractCharacter { maxSkill = 110; break; } - ItemBase itemBase; + ItemTemplate itemBase; for (Integer itemID : fullItemList) { - itemBase = ItemBase.getItemBase(itemID); - boolean exclude = itemBase.getPercentRequired() == 0 && ItemTemplate.templates.get(itemID).item_type == ItemType.WEAPON; - if (itemBase.getPercentRequired() <= maxSkill && !exclude) + itemBase = ItemTemplate.templates.get(itemID); + boolean exclude = (int)itemBase.item_skill_required.values().toArray()[0] == 0 && ItemTemplate.templates.get(itemID).item_type == ItemType.WEAPON; + if ((int)itemBase.item_skill_required.values().toArray()[0] <= maxSkill && !exclude) filteredItemList.add(itemID); } if (this.contract.getVendorID() == 102) {