Browse Source

canRoll work

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

5
src/engine/objects/NPC.java

@ -1067,8 +1067,9 @@ public class NPC extends AbstractCharacter { @@ -1067,8 +1067,9 @@ public class NPC extends AbstractCharacter {
ItemTemplate itemTemplate;
for (Integer itemID : fullItemList) {
itemTemplate = ItemTemplate.templates.get(itemID);
boolean exclude = itemTemplate.item_skill_required.values().iterator().next() == 0 && ItemTemplate.templates.get(itemID).item_type.equals(ItemType.WEAPON);
if (itemTemplate.item_skill_required.values().iterator().next() <= maxSkill && !exclude)
int skillRequired = itemTemplate.item_skill_required.values().iterator().next();
boolean exclude = skillRequired == 0 && ItemTemplate.templates.get(itemID).item_type.equals(ItemType.WEAPON);
if (skillRequired <= maxSkill && !exclude)
filteredItemList.add(itemID);
}
if (this.contract.getVendorID() == 102) {

Loading…
Cancel
Save