From f349e0dda8aa12f1ec3a533b2a069ab8e7ed371c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 10 Mar 2024 07:21:34 -0400 Subject: [PATCH] IsArmor junk removal --- src/engine/gameManager/NPCManager.java | 2 +- src/engine/objects/ItemBase.java | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) 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(); - } - }