diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 21c19ebe..6aa71ffa 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -337,7 +337,7 @@ public enum NPCManager { int baseDef = guard.mobBase.getDefenseRating(); int armorDefense = 0; for(MobEquipment equipped : guard.equip.values()) - if (equipped.getItemBase().isArmor() || ItemTemplate.isShield(equipped.template)) + if (equipped.template.item_type.equals(Enum.ItemType.ARMOR) || ItemTemplate.isShield(equipped.template)) armorDefense += equipped.getItemBase().getDefense(); guard.defenseRating = dexterity + baseDef + armorDefense; } diff --git a/src/engine/objects/ItemBase.java b/src/engine/objects/ItemBase.java index dccece46..346ddbbf 100644 --- a/src/engine/objects/ItemBase.java +++ b/src/engine/objects/ItemBase.java @@ -525,18 +525,4 @@ public class ItemBase { this.offHandAnimations = offHandAnimations; } - public boolean isArmor() { - - if (this.isHeavyArmor()) - return true; - - if (this.isMediumArmor()) - return true; - - if (this.isLightArmor()) - return true; - - return this.isClothArmor(); - } - }