|
|
@ -1316,17 +1316,16 @@ public enum CombatManager { |
|
|
|
|
|
|
|
|
|
|
|
Mob attackedMobile = (Mob) target; |
|
|
|
Mob attackedMobile = (Mob) target; |
|
|
|
|
|
|
|
|
|
|
|
if (attackedMobile.getCombatTarget() != null && !attackedMobile.isSiege()) |
|
|
|
//handle minion informing his captain of an attack
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//handle minion informing his captain of the attack
|
|
|
|
if (attackedMobile.agentType.equals(AIAgentType.GUARDMINION) && attackedMobile.guardCaptain != null && attackedMobile.guardCaptain.isAlive()) |
|
|
|
if (attacker.getObjectType().equals(GameObjectType.Mob)) { |
|
|
|
if (attackedMobile.guardCaptain.combatTarget == null) |
|
|
|
Mob mob = (Mob) attacker; |
|
|
|
attackedMobile.guardCaptain.setCombatTarget(attacker); |
|
|
|
if (mob.agentType.equals(AIAgentType.GUARDMINION) && mob.guardCaptain != null && mob.guardCaptain.isAlive()) |
|
|
|
|
|
|
|
if (mob.guardCaptain.combatTarget == null) |
|
|
|
|
|
|
|
mob.guardCaptain.setCombatTarget(attacker); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
// Mobile already has a target; don't switch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (attackedMobile.getCombatTarget() != null && !attackedMobile.isSiege()) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
attackedMobile.setCombatTarget(attacker); |
|
|
|
attackedMobile.setCombatTarget(attacker); |
|
|
|
|
|
|
|
|
|
|
|