chore(Core/SAI): Allow ACTION_FOLLOW to stop follow movement if target type is SELF or NONE (#16445)

Update SmartScript.cpp
This commit is contained in:
Gultask
2023-06-25 15:04:20 -03:00
committed by GitHub
parent d1f3e606a2
commit 7dcbf7c618

View File

@@ -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;