From 9b5573c2100b08ac39c604215227636e3d2bef02 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 18 May 2023 19:59:39 -0500 Subject: [PATCH] guards get Mob.guardedCity assigned to --- src/engine/ai/MobileFSM.java | 1 + src/engine/objects/Mob.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 65c1b08c..c43cc826 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -310,6 +310,7 @@ public class MobileFSM { return; else{ if(mob.isPlayerGuard && mob.guardedCity._playerMemory.size() < 1 && mob.playerAgroMap.isEmpty()) + //guards use aggro map and players in their local city zone return; } if (mob.despawned && mob.isPlayerGuard) { diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 5a62cecd..db848361 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1989,6 +1989,7 @@ public class Mob extends AbstractIntelligenceAgent { else { this.BehaviourType = MobBehaviourType.GuardCaptain; this.spawnTime = 900; + this.guardedCity = ZoneManager.getCityAtLocation(this.bindLoc); } this.deathTime = 0;