From d197a7ce9b376f45e5de1a5aab3df75b77b62d8f Mon Sep 17 00:00:00 2001 From: Wyrserth Date: Thu, 27 Jun 2019 01:48:12 +0200 Subject: Core/SAI: add param3 to SMART_ACTION_CALL_TIMED_ACTIONLIST to allow it to override a currently running actionlist. (cherry picked from commit eeba12778b330f799eab1530da14bcd8a01b8269) --- src/server/game/AI/SmartScripts/SmartScript.cpp | 4 ++-- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3