From 7dcbf7c6189e537740ea1a71b9086b32b33b3e4b Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:04:20 -0300 Subject: [PATCH] chore(Core/SAI): Allow ACTION_FOLLOW to stop follow movement if target type is SELF or NONE (#16445) Update SmartScript.cpp --- src/server/game/AI/SmartScripts/SmartScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 7c9e29100..114107f7d 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -988,7 +988,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!IsSmart()) break; - if (targets.empty()) + if (e.target.type == SMART_TARGET_NONE || e.target.type == SMART_TARGET_SELF) { CAST_AI(SmartAI, me->AI())->StopFollow(false); break;