Browse Source

This should fail fast.

combat-2
MagicBot 8 months ago
parent
commit
76ae0f4b59
  1. 19
      src/engine/objects/Mob.java

19
src/engine/objects/Mob.java

@ -1037,6 +1037,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
} }
public void recalculateStats() { public void recalculateStats() {
if (this.isPlayerGuard()) { if (this.isPlayerGuard()) {
NPCManager.setMaxHealthForGuard(this); NPCManager.setMaxHealthForGuard(this);
NPCManager.setAttackRatingForGuard(this); NPCManager.setAttackRatingForGuard(this);
@ -1044,26 +1045,16 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
NPCManager.setDamageAndSpeedForGuard(this); NPCManager.setDamageAndSpeedForGuard(this);
NPCManager.applyGuardStanceModifiers(this); NPCManager.applyGuardStanceModifiers(this);
} else { } else {
AbstractCharacter.calculateAtrDamageForWeapon(this, this.charItemManager.equipped.get(EquipSlotType.RHELD), true, this.charItemManager.equipped.get(EquipSlotType.LHELD));
try {
AbstractCharacter.calculateAtrDamageForWeapon(this,this.charItemManager.equipped.get(EquipSlotType.RHELD),true,this.charItemManager.equipped.get(EquipSlotType.LHELD));
AbstractCharacter.calculateAtrDefenseDamage(this); AbstractCharacter.calculateAtrDefenseDamage(this);
} catch (Exception e) {
Logger.error(this.getMobBaseID() + ":" + e);
}
try {
calculateMaxHealthManaStamina(); calculateMaxHealthManaStamina();
} catch (Exception e) {
Logger.error(e.getMessage());
} }
}
try {
calculateModifiedStats(); calculateModifiedStats();
} catch (Exception e) {
Logger.error(e.getMessage());
}
if (this.isSiege()) if (this.isSiege())
this.healthMax = 10000; this.healthMax = 10000;
Resists.calculateResists(this); Resists.calculateResists(this);
} }

Loading…
Cancel
Save