Refactor item_type

This commit is contained in:
2024-03-10 13:34:24 -04:00
parent 87290baa52
commit df5c607375
24 changed files with 137 additions and 203 deletions
+2 -2
View File
@@ -1070,7 +1070,7 @@ public class NPC extends AbstractCharacter {
ItemBase itemBase;
for (Integer itemID : fullItemList) {
itemBase = ItemBase.getItemBase(itemID);
boolean exclude = itemBase.getPercentRequired() == 0 && itemBase.getType() == ItemType.WEAPON;
boolean exclude = itemBase.getPercentRequired() == 0 && ItemTemplate.itemTemplates.get(itemID).item_type == ItemType.WEAPON;
if (itemBase.getPercentRequired() <= maxSkill && !exclude)
filteredItemList.add(itemID);
}
@@ -1095,7 +1095,7 @@ public class NPC extends AbstractCharacter {
if (ib == null)
return 0;
if (ib.getType() == ItemType.SCROLL)
if (ItemTemplate.itemTemplates.get(itemID).item_type == ItemType.SCROLL)
return this.getRank() * 60 * 60 * 3;
float time;