fix(Core/SmartScripts): don't allow to start a new SAI actionlist while the entity is already running one (#10230)

* cherry-pick commit (2b1cde2560)
This commit is contained in:
IntelligentQuantum
2022-04-17 06:16:08 +04:30
committed by GitHub
parent e38a17d2da
commit 3555f5916d

View File

@@ -5075,6 +5075,12 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry)
return;
}
// Do NOT allow to start a new actionlist if a previous one is already running. We need to always finish the current actionlist
if (!mTimedActionList.empty())
{
return;
}
mTimedActionList.clear();
mTimedActionList = sSmartScriptMgr->GetScript(entry, SMART_SCRIPT_TYPE_TIMED_ACTIONLIST);
if (mTimedActionList.empty())