mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix(Core/SmartScripts): Added option to override current running time… (#12298)
fix(Core/SmartScripts): Added option to override current running timed actionlist. Fixes #12227
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `smart_scripts` SET `action_param3`=1 WHERE `entryorguid`=26293 AND `source_type`=0 AND `id`=2;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1081,6 +1081,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 id;
|
||||
uint32 timerType;
|
||||
SAIBool allowOverride;
|
||||
} timedActionList;
|
||||
|
||||
struct
|
||||
|
||||
Reference in New Issue
Block a user