From 1c10f8a872c813d95bc8ba295c803e26386ba467 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 4 Jun 2024 20:47:08 -0500 Subject: [PATCH] pet damage fixed --- src/engine/gameManager/CombatManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index da4a806b..0038aac1 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -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;