From 14f98493c7661d39e407ac0682d21964183bbec7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 7 May 2023 08:06:15 -0500 Subject: [PATCH] guard minions no longer respawn while captain is dead --- src/engine/ai/MobileFSM.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 6147aaec..2f432a95 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -317,6 +317,12 @@ public class MobileFSM { } if (mob.despawned && mob.isPlayerGuard) { //override for guards + if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){ + if(mob.npcOwner.isAlive() == false || ((Mob)mob.npcOwner).despawned == true){ + //minions don't respawn while guard captain is dead + return; + } + } CheckForRespawn(mob); //check to send mob home for player guards to prevent exploit of dragging guards away and then teleporting CheckToSendMobHome(mob);