diff options
author | Wyrserth <wyrserth@protonmail.com> | 2019-06-27 01:48:12 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-13 00:42:17 +0100 |
commit | d197a7ce9b376f45e5de1a5aab3df75b77b62d8f (patch) | |
tree | 6bc2800a237a88c7a4c75a60dddd39a59c1e1dd9 /src | |
parent | 0413abf8f9b6fbd1e11737e16a14c394d8c6f8e0 (diff) |
Core/SAI: add param3 to SMART_ACTION_CALL_TIMED_ACTIONLIST to allow it to override a currently running actionlist.
(cherry picked from commit eeba12778b330f799eab1530da14bcd8a01b8269)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 90d4a22ce54..58458243ed8 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -4144,8 +4144,8 @@ 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()) + // 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; mTimedActionList.clear(); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index a3f2d15b646..00e74aaab2a 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1000,6 +1000,7 @@ struct SmartAction { uint32 id; uint32 timerType; + uint32 allowOverride; } timedActionList; struct |