pet damage fixed

This commit is contained in:
2024-06-04 20:47:08 -05:00
parent 4f28fefbc2
commit 1c10f8a872
+6 -1
View File
@@ -444,7 +444,9 @@ public enum CombatManager {
return;
}
//calculate resisted damage including fortitude
if(attacker.getObjectType().equals(mbEnums.GameObjectType.Mob))
if(((Mob)attacker).isPet())
damage *= attacker.level * 0.1f;
damage = (int) resists.getResistedDamage(attacker, (AbstractCharacter) target, damageType, damage, 0);
}
}
@@ -613,6 +615,9 @@ public enum CombatManager {
public static void setAutoAttackJob(AbstractCharacter attacker, mbEnums.EquipSlotType slot, long delay) {
//calculate next allowed attack and update the timestamp
if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) == false)
return; //mobs dont submit auto attack jobs
if(attacker.getTimestamps().containsKey("Attack" + slot.name()) && attacker.getTimestamps().get("Attack" + slot.name()) > System.currentTimeMillis())
return;