forked from MagicBane/Server
Attacking guard flags you as an outlaw.
This commit is contained in:
@@ -1318,10 +1318,18 @@ public enum CombatManager {
|
|||||||
|
|
||||||
//handle minion informing his captain of an attack
|
//handle minion informing his captain of an attack
|
||||||
|
|
||||||
if (attackedMobile.agentType.equals(AIAgentType.GUARDMINION) && attackedMobile.guardCaptain != null && attackedMobile.guardCaptain.isAlive())
|
if (attackedMobile.agentType.equals(AIAgentType.GUARDMINION) && attackedMobile.guardCaptain != null && attackedMobile.guardCaptain.isAlive()) {
|
||||||
|
|
||||||
if (attackedMobile.guardCaptain.combatTarget == null)
|
if (attackedMobile.guardCaptain.combatTarget == null)
|
||||||
attackedMobile.guardCaptain.setCombatTarget(attacker);
|
attackedMobile.guardCaptain.setCombatTarget(attacker);
|
||||||
|
|
||||||
|
// Add to city outlaw list
|
||||||
|
|
||||||
|
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||||
|
attackedMobile.guardedCity.cityOutlaws.add(attacker.getObjectUUID());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Mobile already has a target; don't switch.
|
// Mobile already has a target; don't switch.
|
||||||
|
|
||||||
if (attackedMobile.getCombatTarget() != null && !attackedMobile.isSiege())
|
if (attackedMobile.getCombatTarget() != null && !attackedMobile.isSiege())
|
||||||
|
|||||||
Reference in New Issue
Block a user