Core/SAI: add param3 to SMART_ACTION_CALL_TIMED_ACTIONLIST to allow it to override a currently running actionlist.
Port From (https://github.com/TrinityCore/TrinityCore/commit/d197a7ce9b376f45e5de1a5aab3df75b77b62d8f)
This commit is contained in:
@@ -2899,6 +2899,7 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
public uint id;
|
public uint id;
|
||||||
public uint timerType;
|
public uint timerType;
|
||||||
|
public uint allowOverride;
|
||||||
}
|
}
|
||||||
public struct RandTimedActionList
|
public struct RandTimedActionList
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4165,7 +4165,7 @@ namespace Game.AI
|
|||||||
public void SetTimedActionList(SmartScriptHolder e, uint entry, Unit invoker)
|
public void SetTimedActionList(SmartScriptHolder e, uint entry, Unit invoker)
|
||||||
{
|
{
|
||||||
// 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
|
// 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 (!_timedActionList.Empty())
|
if (e.Action.timedActionList.allowOverride == 0 && !_timedActionList.Empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_timedActionList.Clear();
|
_timedActionList.Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user