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
@@ -1295,7 +1295,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
if (ib == null)
return 0;
if (!ib.getType().equals(ItemType.ARMOR))
if (!armor.template.item_type.equals(ItemType.ARMOR))
return 0;
if (ib.getSkillRequired().isEmpty())
@@ -1334,7 +1334,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
if (ib == null)
noWeapon = true;
else if (ib.getType().equals(ItemType.WEAPON) == false) {
else if (weapon.template.item_type.equals(ItemType.WEAPON) == false) {
defaultAtrAndDamage(mainHand);
return;
} else