From b1bd09bfc481b9e0ea05f7b0fed556efbdde97d8 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 16 Apr 2023 20:52:37 -0500 Subject: [PATCH] GuardCaptain flag in run after load --- src/engine/objects/Mob.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 3cd19230..8c1f3b62 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -843,7 +843,6 @@ public class Mob extends AbstractIntelligenceAgent { for (int slot = 1; slot < maxSlots + 1; slot++) if (!this.building.getHirelings().containsValue(slot)) { this.building.getHirelings().put(this, slot); - this.BehaviourType = MobileFSM.MobBehaviourType.GuardCaptain; break; } } @@ -1996,6 +1995,9 @@ public class Mob extends AbstractIntelligenceAgent { } } this.BehaviourType = this.getMobBase().fsm; + if(this.isPlayerGuard() && this.contract != null){ + this.BehaviourType = MobileFSM.MobBehaviourType.GuardCaptain; + } } catch (Exception e) { Logger.error(e.getMessage()); }