Browse Source

pet damage fixed

combat-3
FatBoy-DOTC 7 months ago
parent
commit
1c10f8a872
  1. 7
      src/engine/gameManager/CombatManager.java

7
src/engine/gameManager/CombatManager.java

@ -444,7 +444,9 @@ public enum CombatManager {
return; return;
} }
//calculate resisted damage including fortitude //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); 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) { public static void setAutoAttackJob(AbstractCharacter attacker, mbEnums.EquipSlotType slot, long delay) {
//calculate next allowed attack and update the timestamp //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()) if(attacker.getTimestamps().containsKey("Attack" + slot.name()) && attacker.getTimestamps().get("Attack" + slot.name()) > System.currentTimeMillis())
return; return;

Loading…
Cancel
Save