diff --git a/data/sql/updates/pending_db_world/rev_1656849991610651600.sql b/data/sql/updates/pending_db_world/rev_1656849991610651600.sql new file mode 100644 index 000000000..5b39602f3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656849991610651600.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param3`=1 WHERE `entryorguid`=26293 AND `source_type`=0 AND `id`=2; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 1f8cb7030..d1da549cf 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -5099,8 +5099,8 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry) 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; } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 23a93f166..82292262d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1774,9 +1774,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) AC_SAI_IS_BOOLEAN_VALID(e, e.action.setHealthRegen.regenHealth); break; } + case SMART_ACTION_CALL_TIMED_ACTIONLIST: + { + AC_SAI_IS_BOOLEAN_VALID(e, e.action.timedActionList.allowOverride); + break; + } case SMART_ACTION_FLEE_FOR_ASSIST: case SMART_ACTION_MOVE_TO_POS: - case SMART_ACTION_CALL_TIMED_ACTIONLIST: case SMART_ACTION_EVADE: case SMART_ACTION_SET_ACTIVE: case SMART_ACTION_START_CLOSEST_WAYPOINT: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0867679fe..c8f3f2609 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1081,6 +1081,7 @@ struct SmartAction { uint32 id; uint32 timerType; + SAIBool allowOverride; } timedActionList; struct