Browse Source

remove ItemBase from NPC

combat-2
FatBoy-DOTC 8 months ago
parent
commit
6514fd8dc3
  1. 8
      src/engine/objects/NPC.java

8
src/engine/objects/NPC.java

@ -1064,11 +1064,11 @@ public class NPC extends AbstractCharacter {
maxSkill = 110; maxSkill = 110;
break; break;
} }
ItemBase itemBase; ItemTemplate itemBase;
for (Integer itemID : fullItemList) { for (Integer itemID : fullItemList) {
itemBase = ItemBase.getItemBase(itemID); itemBase = ItemTemplate.templates.get(itemID);
boolean exclude = itemBase.getPercentRequired() == 0 && ItemTemplate.templates.get(itemID).item_type == ItemType.WEAPON; boolean exclude = (int)itemBase.item_skill_required.values().toArray()[0] == 0 && ItemTemplate.templates.get(itemID).item_type == ItemType.WEAPON;
if (itemBase.getPercentRequired() <= maxSkill && !exclude) if ((int)itemBase.item_skill_required.values().toArray()[0] <= maxSkill && !exclude)
filteredItemList.add(itemID); filteredItemList.add(itemID);
} }
if (this.contract.getVendorID() == 102) { if (this.contract.getVendorID() == 102) {

Loading…
Cancel
Save