diff options
| author | Wyrserth <43747507+Wyrserth@users.noreply.github.com> | 2019-06-16 20:00:57 +0200 |
|---|---|---|
| committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-06-16 20:00:57 +0200 |
| commit | 2b1cde25604b6400ac327801d8e1649e30688f5a (patch) | |
| tree | 16eb3b84ccb7c9fc33295f911027bfe87fb82585 | |
| parent | ce3dcdcb1ad1887fb3a531aaea09482c12b5e4f3 (diff) | |
Core/SAI: don't allow to start a new SAI actionlist while the entity is already running one. (#23421)
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index f4367018329..2dc8ae55c3a 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -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()) |
