mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/SAI: don't allow to start a new SAI actionlist while the entity is already running one. (#23421)
This commit is contained in:
committed by
Giacomo Pozzoni
parent
ce3dcdcb1a
commit
2b1cde2560
@@ -3801,6 +3801,10 @@ void SmartScript::SetTimedActionList(SmartScriptHolder& e, uint32 entry, Unit* i
|
||||
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())
|
||||
|
||||
Reference in New Issue
Block a user