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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do NOT allow to start a new actionlist if a previous one is already running. We need to always finish the current actionlist
|
// 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 (!mTimedActionList.empty())
|
if (!e.action.timedActionList.allowOverride && !mTimedActionList.empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1774,9 +1774,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
|||||||
AC_SAI_IS_BOOLEAN_VALID(e, e.action.setHealthRegen.regenHealth);
|
AC_SAI_IS_BOOLEAN_VALID(e, e.action.setHealthRegen.regenHealth);
|
||||||
break;
|
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_FLEE_FOR_ASSIST:
|
||||||
case SMART_ACTION_MOVE_TO_POS:
|
case SMART_ACTION_MOVE_TO_POS:
|
||||||
case SMART_ACTION_CALL_TIMED_ACTIONLIST:
|
|
||||||
case SMART_ACTION_EVADE:
|
case SMART_ACTION_EVADE:
|
||||||
case SMART_ACTION_SET_ACTIVE:
|
case SMART_ACTION_SET_ACTIVE:
|
||||||
case SMART_ACTION_START_CLOSEST_WAYPOINT:
|
case SMART_ACTION_START_CLOSEST_WAYPOINT:
|
||||||
|
|||||||
@@ -1081,6 +1081,7 @@ struct SmartAction
|
|||||||
{
|
{
|
||||||
uint32 id;
|
uint32 id;
|
||||||
uint32 timerType;
|
uint32 timerType;
|
||||||
|
SAIBool allowOverride;
|
||||||
} timedActionList;
|
} timedActionList;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
|||||||
Reference in New Issue
Block a user