aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWyrserth <43747507+Wyrserth@users.noreply.github.com>2019-06-16 20:00:57 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-11 14:13:11 +0100
commite846d4c3ef04d75839325409df109156d8ccced0 (patch)
tree55d3baaa93e915e435ff863aff2dc6fe7374f189 /src
parentae43820ca0db692d1ff176b216ab641cc4760d49 (diff)
Core/SAI: don't allow to start a new SAI actionlist while the entity is already running one. (#23421)
(cherry picked from commit 2b1cde25604b6400ac327801d8e1649e30688f5a)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp4
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 ddaab3492e0..06d28bad846 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -4143,6 +4143,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())