From ca11651be67273aa76b1b20c637819063d27c67b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 28 May 2023 15:45:38 -0500 Subject: [PATCH] guards use proper aggro rules for added aggro check --- src/engine/ai/MobileFSM.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index a5cd74be..eed4a390 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -484,7 +484,14 @@ public class MobileFSM { } private static void CheckToSendMobHome(Mob mob) { if(mob.BehaviourType.isAgressive) { - CheckForAggro(mob); + if(mob.isPlayerGuard()) + { + if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardCaptain.ordinal()){ + CheckForPlayerGuardAggro(mob); + } + } else { + CheckForAggro(mob); + } } if(mob.getCombatTarget() != null && CombatUtilities.inRange2D(mob,mob.getCombatTarget(),MBServerStatics.AI_BASE_AGGRO_RANGE * 0.5f)){ return;