fix(Core/SmartScripts): Added option to override current running time… (#12298)

fix(Core/SmartScripts): Added option to override current running timed actionlist.

Fixes #12227
This commit is contained in:
UltraNix
2022-07-03 17:22:25 +02:00
committed by GitHub
parent 7b9a5a676b
commit 65e02d9422
4 changed files with 10 additions and 3 deletions

View File

@@ -5099,8 +5099,8 @@ 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())
// Do NOT allow to start a new actionlist if a previous one is already running, unless explicitly allowed. We need to always finish the current actionlist
if (!e.action.timedActionList.allowOverride && !mTimedActionList.empty())
{
return;
}