Browse Source

IsArmor junk removal

combat-2
MagicBot 8 months ago
parent
commit
f349e0dda8
  1. 2
      src/engine/gameManager/NPCManager.java
  2. 14
      src/engine/objects/ItemBase.java

2
src/engine/gameManager/NPCManager.java

@ -337,7 +337,7 @@ public enum NPCManager {
int baseDef = guard.mobBase.getDefenseRating(); int baseDef = guard.mobBase.getDefenseRating();
int armorDefense = 0; int armorDefense = 0;
for(MobEquipment equipped : guard.equip.values()) 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(); armorDefense += equipped.getItemBase().getDefense();
guard.defenseRating = dexterity + baseDef + armorDefense; guard.defenseRating = dexterity + baseDef + armorDefense;
} }

14
src/engine/objects/ItemBase.java

@ -525,18 +525,4 @@ public class ItemBase {
this.offHandAnimations = offHandAnimations; this.offHandAnimations = offHandAnimations;
} }
public boolean isArmor() {
if (this.isHeavyArmor())
return true;
if (this.isMediumArmor())
return true;
if (this.isLightArmor())
return true;
return this.isClothArmor();
}
} }

Loading…
Cancel
Save