forked from MagicBane/Server
Refactored isShield and removed equipflag.
This commit is contained in:
@@ -1141,14 +1141,13 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
this.rangeHandTwo = 6.5f;
|
||||
this.speedHandTwo = 20;
|
||||
|
||||
if (this.equip.get(EquipSlotType.RHELD) != null) {
|
||||
//has mainhand weapon to calculate
|
||||
calculateAtrDamageForWeapon(this.equip.get(EquipSlotType.LHELD), true);
|
||||
}
|
||||
if (this.equip.get(EquipSlotType.LHELD) != null && !this.equip.get(EquipSlotType.LHELD).getItemBase().isShield()) {
|
||||
//has offhand weapon to calculate
|
||||
calculateAtrDamageForWeapon(this.equip.get(EquipSlotType.LHELD), false);
|
||||
}
|
||||
if (this.equip.get(EquipSlotType.RHELD) != null)
|
||||
calculateAtrDamageForWeapon(this.equip.get(EquipSlotType.LHELD), true); //has mainhand weapon to calculate
|
||||
|
||||
|
||||
if (this.equip.get(EquipSlotType.LHELD) != null && !ItemTemplate.isShield(this.equip.get(EquipSlotType.LHELD).template))
|
||||
calculateAtrDamageForWeapon(this.equip.get(EquipSlotType.LHELD), false); //has offhand weapon to calculate
|
||||
|
||||
|
||||
try {
|
||||
calculateAtrDamageForWeapon(this.equip.get(EquipSlotType.RHELD), true);
|
||||
@@ -1264,7 +1263,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
|
||||
ItemBase ab = shield.getItemBase();
|
||||
|
||||
if (ab == null || !ab.isShield())
|
||||
if (!ItemTemplate.isShield(shield.template))
|
||||
return 0;
|
||||
|
||||
CharacterSkill blockSkill = this.skills.get("Block");
|
||||
|
||||
Reference in New Issue
Block a user