diff options
author | Wyrserth <wyrserth@protonmail.com> | 2019-06-27 01:48:12 +0200 |
---|---|---|
committer | Wyrserth <wyrserth@protonmail.com> | 2019-06-27 01:48:12 +0200 |
commit | eeba12778b330f799eab1530da14bcd8a01b8269 (patch) | |
tree | 8229a8493cf8c9c6b569f14cd407423f40ee8951 | |
parent | 81939b96855489815f45795b9941f6d956d2dd89 (diff) |
Core/SAI: add param3 to SMART_ACTION_CALL_TIMED_ACTIONLIST to allow it to override a currently running actionlist.
-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 25a8b9d6962..df85fa3bada 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3802,8 +3802,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 f6611ce4e09..3fe2c2a28ee 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -962,6 +962,7 @@ struct SmartAction { uint32 id; uint32 timerType; + uint32 allowOverride; } timedActionList; struct |