From 56a6b9d2044abc64713457f84352519f99b17bd4 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 30 Apr 2023 15:04:12 -0500 Subject: [PATCH] guard minion logic work --- src/engine/ai/MobileFSM.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 68404682..3149945e 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -384,12 +384,15 @@ public class MobileFSM { return; mob.updateLocation(); if (mob.BehaviourType != Enum.MobBehaviourType.Pet1) { - if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal() && ((Mob)mob.npcOwner).despawned == true) - return; - if (mob.getCombatTarget() == null) + if (mob.getCombatTarget() == null) { + if (mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal() && (mob.npcOwner).isAlive()) { + return; + } Patrol(mob); - else + } + else { chaseTarget(mob); + } } else { //pet logic if (!mob.playerAgroMap.containsKey(mob.getOwner().getObjectUUID())) {