Browse Source

canRoll work

combat-2
FatBoy-DOTC 8 months ago
parent
commit
25fed51523
  1. 6
      src/engine/objects/NPC.java

6
src/engine/objects/NPC.java

@ -1065,9 +1065,13 @@ public class NPC extends AbstractCharacter { @@ -1065,9 +1065,13 @@ public class NPC extends AbstractCharacter {
break;
}
ItemTemplate itemTemplate;
int skillRequired = 0;
for (Integer itemID : fullItemList) {
itemTemplate = ItemTemplate.templates.get(itemID);
int skillRequired = itemTemplate.item_skill_required.values().iterator().next();
if(itemTemplate.item_skill_required.values().iterator().hasNext())
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);

Loading…
Cancel
Save