diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 0126c4ad..9afc373a 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -578,14 +578,24 @@ public class MobAI { return; } - //no players loaded, no need to proceed + //no players loaded, no need to proceed unless it's a player guard + boolean bypassLoadedPlayerCheck = false; + if(mob.isPlayerGuard()) { - if (mob.playerAgroMap.isEmpty()) { + if (mob.guardedCity != null) { + if (!mob.guardedCity._playerMemory.isEmpty()) { + bypassLoadedPlayerCheck = true; + } + } + } + + if (mob.playerAgroMap.isEmpty() && !bypassLoadedPlayerCheck) { if (mob.getCombatTarget() != null) mob.setCombatTarget(null); return; } + if (mob.agentType.equals(Enum.AIAgentType.PET) == false) CheckToSendMobHome(mob);