From d3692d0fb7fc2cee73dc2ba7c440d9e6c783adce Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 8 Sep 2023 13:04:29 -0400 Subject: [PATCH] Out of combat mode when patrolling. --- src/engine/mobileAI/MobAI.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index b4543321..cdf221a5 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -20,6 +20,7 @@ import engine.mobileAI.utilities.MovementUtilities; import engine.net.DispatchMessage; import engine.net.client.msg.PerformActionMsg; import engine.net.client.msg.PowerProjectileMsg; +import engine.net.client.msg.UpdateStateMsg; import engine.objects.*; import engine.powers.ActionsBase; import engine.powers.PowersBase; @@ -1305,6 +1306,13 @@ public class MobAI { //make sure mob is out of combat stance + if (minion.getKey().isCombat() && minion.getKey().getCombatTarget() == null) { + minion.getKey().setCombat(false); + UpdateStateMsg rwss = new UpdateStateMsg(); + rwss.setPlayer(minion.getKey()); + DispatchMessage.sendToAllInRange(minion.getKey(), rwss); + } + if (minion.getKey().despawned == false) { if (MovementUtilities.canMove(minion.getKey())) { Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3);