Core/SAI: Remove deprecated events and actions
Port From (https://github.com/TrinityCore/TrinityCore/commit/e27724b3620ce245c8055d1cfa58b7caade7fb64)
This commit is contained in:
@@ -166,13 +166,13 @@ namespace Framework.Constants
|
|||||||
Range = 9, // Mindist, Maxdist, Repeatmin, Repeatmax
|
Range = 9, // Mindist, Maxdist, Repeatmin, Repeatmax
|
||||||
OocLos = 10, // HostilityMode, Maxrnage, Cooldownmin, Cooldownmax
|
OocLos = 10, // HostilityMode, Maxrnage, Cooldownmin, Cooldownmax
|
||||||
Respawn = 11, // Type, Mapid, Zoneid
|
Respawn = 11, // Type, Mapid, Zoneid
|
||||||
TargetHealthPct = 12, // UNUSED, do not reuse
|
TargetHealthPct = 12, // UNUSED, DO NOT REUSE
|
||||||
VictimCasting = 13, // Repeatmin, Repeatmax
|
VictimCasting = 13, // Repeatmin, Repeatmax
|
||||||
FriendlyHealth = 14, // UNUSED, do not reuse
|
FriendlyHealth = 14, // UNUSED, DO NOT REUSE
|
||||||
FriendlyIsCc = 15, // Radius, Repeatmin, Repeatmax
|
FriendlyIsCc = 15, // Radius, Repeatmin, Repeatmax
|
||||||
FriendlyMissingBuff = 16, // Spellid, Radius, Repeatmin, Repeatmax
|
FriendlyMissingBuff = 16, // Spellid, Radius, Repeatmin, Repeatmax
|
||||||
SummonedUnit = 17, // Creatureid(0 All), Cooldownmin, Cooldownmax
|
SummonedUnit = 17, // Creatureid(0 All), Cooldownmin, Cooldownmax
|
||||||
TargetManaPct = 18, // UNUSED, do not reuse
|
TargetManaPct = 18, // UNUSED, DO NOT REUSE
|
||||||
AcceptedQuest = 19, // QuestID (0 = any), CooldownMin, CooldownMax
|
AcceptedQuest = 19, // QuestID (0 = any), CooldownMin, CooldownMax
|
||||||
RewardQuest = 20, // QuestID (0 = any), CooldownMin, CooldownMax
|
RewardQuest = 20, // QuestID (0 = any), CooldownMin, CooldownMax
|
||||||
ReachedHome = 21, // None
|
ReachedHome = 21, // None
|
||||||
@@ -184,7 +184,7 @@ namespace Framework.Constants
|
|||||||
PassengerBoarded = 27, // Cooldownmin, Cooldownmax
|
PassengerBoarded = 27, // Cooldownmin, Cooldownmax
|
||||||
PassengerRemoved = 28, // Cooldownmin, Cooldownmax
|
PassengerRemoved = 28, // Cooldownmin, Cooldownmax
|
||||||
Charmed = 29, // onRemove (0 - on apply, 1 - on remove)
|
Charmed = 29, // onRemove (0 - on apply, 1 - on remove)
|
||||||
CharmedTarget = 30, // None
|
CharmedTarget = 30, // UNUSED, DO NOT REUSE
|
||||||
SpellHitTarget = 31, // Spellid, School, Cooldownmin, Cooldownmax
|
SpellHitTarget = 31, // Spellid, School, Cooldownmin, Cooldownmax
|
||||||
Damaged = 32, // Mindmg, Maxdmg, Cooldownmin, Cooldownmax
|
Damaged = 32, // Mindmg, Maxdmg, Cooldownmin, Cooldownmax
|
||||||
DamagedTarget = 33, // Mindmg, Maxdmg, Cooldownmin, Cooldownmax
|
DamagedTarget = 33, // Mindmg, Maxdmg, Cooldownmin, Cooldownmax
|
||||||
@@ -193,7 +193,7 @@ namespace Framework.Constants
|
|||||||
CorpseRemoved = 36, // None
|
CorpseRemoved = 36, // None
|
||||||
AiInit = 37, // None
|
AiInit = 37, // None
|
||||||
DataSet = 38, // Id, Value, Cooldownmin, Cooldownmax
|
DataSet = 38, // Id, Value, Cooldownmin, Cooldownmax
|
||||||
WaypointStart = 39, // Pointid(0any), Pathid(0any)
|
WaypointStart = 39, // UNUSED, DO NOT REUSE
|
||||||
WaypointReached = 40, // Pointid(0any), Pathid(0any)
|
WaypointReached = 40, // Pointid(0any), Pathid(0any)
|
||||||
TransportAddplayer = 41, // None
|
TransportAddplayer = 41, // None
|
||||||
TransportAddcreature = 42, // Entry (0 Any)
|
TransportAddcreature = 42, // Entry (0 Any)
|
||||||
@@ -220,8 +220,8 @@ namespace Framework.Constants
|
|||||||
JustCreated = 63, // None
|
JustCreated = 63, // None
|
||||||
GossipHello = 64, // noReportUse (for GOs)
|
GossipHello = 64, // noReportUse (for GOs)
|
||||||
FollowCompleted = 65, // None
|
FollowCompleted = 65, // None
|
||||||
PhaseChange = 66,
|
PhaseChange = 66, //UNUSED, DO NOT REUSE
|
||||||
IsBehindTarget = 67, // UNUSED, do not reuse
|
IsBehindTarget = 67, // UNUSED, DO NOT REUSE
|
||||||
GameEventStart = 68, // GameEvent.Entry
|
GameEventStart = 68, // GameEvent.Entry
|
||||||
GameEventEnd = 69, // GameEvent.Entry
|
GameEventEnd = 69, // GameEvent.Entry
|
||||||
GoLootStateChanged = 70, // Go State
|
GoLootStateChanged = 70, // Go State
|
||||||
@@ -261,8 +261,8 @@ namespace Framework.Constants
|
|||||||
CallAreaexploredoreventhappens = 15, // Questid
|
CallAreaexploredoreventhappens = 15, // Questid
|
||||||
SetIngamePhaseGroup = 16, // phaseGroupId, apply
|
SetIngamePhaseGroup = 16, // phaseGroupId, apply
|
||||||
SetEmoteState = 17, // Emoteid
|
SetEmoteState = 17, // Emoteid
|
||||||
SetUnitFlag = 18, // UNUSED, do not reuse
|
SetUnitFlag = 18, // UNUSED, DO NOT REUSE
|
||||||
RemoveUnitFlag = 19, // UNUSED, do not reuse
|
RemoveUnitFlag = 19, // UNUSED, DO NOT REUSE
|
||||||
AutoAttack = 20, // Allowattackstate (0 = Stop Attack, Anything Else Means Continue Attacking)
|
AutoAttack = 20, // Allowattackstate (0 = Stop Attack, Anything Else Means Continue Attacking)
|
||||||
AllowCombatMovement = 21, // Allowcombatmovement (0 = Stop Combat Based Movement, Anything Else Continue Attacking)
|
AllowCombatMovement = 21, // Allowcombatmovement (0 = Stop Combat Based Movement, Anything Else Continue Attacking)
|
||||||
SetEventPhase = 22, // Phase
|
SetEventPhase = 22, // Phase
|
||||||
@@ -301,10 +301,10 @@ namespace Framework.Constants
|
|||||||
WpStop = 55, // Despawntime, Quest, Fail?
|
WpStop = 55, // Despawntime, Quest, Fail?
|
||||||
AddItem = 56, // Itemid, Count
|
AddItem = 56, // Itemid, Count
|
||||||
RemoveItem = 57, // Itemid, Count
|
RemoveItem = 57, // Itemid, Count
|
||||||
InstallAITemplate = 58, // UNUSED, do not reuse
|
InstallAITemplate = 58, // UNUSED, DO NOT REUSE
|
||||||
SetRun = 59, // 0/1
|
SetRun = 59, // 0/1
|
||||||
SetDisableGravity = 60, // 0/1
|
SetDisableGravity = 60, // 0/1
|
||||||
SetSwim = 61, // 0/1
|
SetSwim = 61, // UNUSED, DO NOT REUSE
|
||||||
Teleport = 62, // Mapid,
|
Teleport = 62, // Mapid,
|
||||||
SetCounter = 63, // id, value, reset (0/1)
|
SetCounter = 63, // id, value, reset (0/1)
|
||||||
StoreTargetList = 64, // Varid,
|
StoreTargetList = 64, // Varid,
|
||||||
@@ -319,8 +319,8 @@ namespace Framework.Constants
|
|||||||
TriggerTimedEvent = 73, // Id(>1)
|
TriggerTimedEvent = 73, // Id(>1)
|
||||||
RemoveTimedEvent = 74, // Id(>1)
|
RemoveTimedEvent = 74, // Id(>1)
|
||||||
AddAura = 75, // UNUSED, DO NOT REUSE
|
AddAura = 75, // UNUSED, DO NOT REUSE
|
||||||
OverrideScriptBaseObject = 76, // Warning: Can Crash Core, Do Not Use If You Dont Know What You Are Doing
|
OverrideScriptBaseObject = 76, // UNUSED, DO NOT REUSE
|
||||||
ResetScriptBaseObject = 77, // None
|
ResetScriptBaseObject = 77, // UNUSED, DO NOT REUSE
|
||||||
CallScriptReset = 78, // None
|
CallScriptReset = 78, // None
|
||||||
SetRangedMovement = 79, // Distance, Angle
|
SetRangedMovement = 79, // Distance, Angle
|
||||||
CallTimedActionlist = 80, // Id (Overwrites Already Running Actionlist), Stop After Combat?(0/1), Timer Update Type(0-Ooc, 1-Ic, 2-Always)
|
CallTimedActionlist = 80, // Id (Overwrites Already Running Actionlist), Stop After Combat?(0/1), Timer Update Type(0-Ooc, 1-Ic, 2-Always)
|
||||||
@@ -337,9 +337,9 @@ namespace Framework.Constants
|
|||||||
RemoveUnitFieldBytes1 = 91, // Bytes, Target
|
RemoveUnitFieldBytes1 = 91, // Bytes, Target
|
||||||
InterruptSpell = 92,
|
InterruptSpell = 92,
|
||||||
SendGoCustomAnim = 93, // Anim Id
|
SendGoCustomAnim = 93, // Anim Id
|
||||||
SetDynamicFlag = 94, // UNUSED, do not reuse
|
SetDynamicFlag = 94, // UNUSED, DO NOT REUSE
|
||||||
AddDynamicFlag = 95, // UNUSED, do not reuse
|
AddDynamicFlag = 95, // UNUSED, DO NOT REUSE
|
||||||
RemoveDynamicFlag = 96, // UNUSED, do not reuse
|
RemoveDynamicFlag = 96, // UNUSED, DO NOT REUSE
|
||||||
JumpToPos = 97, // Speedxy, Speedz, Targetx, Targety, Targetz
|
JumpToPos = 97, // Speedxy, Speedz, Targetx, Targety, Targetz
|
||||||
SendGossipMenu = 98, // Menuid, optionIndex
|
SendGossipMenu = 98, // Menuid, optionIndex
|
||||||
GoSetLootState = 99, // State
|
GoSetLootState = 99, // State
|
||||||
@@ -362,14 +362,14 @@ namespace Framework.Constants
|
|||||||
SetCorpseDelay = 116, // timer
|
SetCorpseDelay = 116, // timer
|
||||||
DisableEvade = 117, // 0/1 (1 = disabled, 0 = enabled)
|
DisableEvade = 117, // 0/1 (1 = disabled, 0 = enabled)
|
||||||
GoSetGoState = 118,
|
GoSetGoState = 118,
|
||||||
SetCanFly = 119, // 0/1
|
SetCanFly = 119, // UNUSED, DO NOT REUSE
|
||||||
RemoveAurasByType = 120, // type
|
RemoveAurasByType = 120, // UNUSED, DO NOT REUSE
|
||||||
SetSightDist = 121, // sightDistance
|
SetSightDist = 121, // UNUSED, DO NOT REUSE
|
||||||
Flee = 122, // fleeTime
|
Flee = 122, // UNUSED, DO NOT REUSE
|
||||||
AddThreat = 123, // +threat, -threat
|
AddThreat = 123, // +threat, -threat
|
||||||
LoadEquipment = 124, // id
|
LoadEquipment = 124, // id
|
||||||
TriggerRandomTimedEvent = 125, // id min range, id max range
|
TriggerRandomTimedEvent = 125, // id min range, id max range
|
||||||
RemoveAllGameobjects = 126,
|
RemoveAllGameobjects = 126, // UNUSED, DO NOT REUSE
|
||||||
PauseMovement = 127, // MovementSlot (default = 0, active = 1, controlled = 2), PauseTime (ms), Force
|
PauseMovement = 127, // MovementSlot (default = 0, active = 1, controlled = 2), PauseTime (ms), Force
|
||||||
PlayAnimkit = 128,
|
PlayAnimkit = 128,
|
||||||
ScenePlay = 129, // sceneId
|
ScenePlay = 129, // sceneId
|
||||||
|
|||||||
@@ -401,11 +401,6 @@ namespace Game.AI
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void WaypointStarted(uint nodeId, uint pathId)
|
|
||||||
{
|
|
||||||
GetScript().ProcessEventsFor(SmartEvents.WaypointStart, null, nodeId, pathId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void WaypointReached(uint nodeId, uint pathId)
|
public override void WaypointReached(uint nodeId, uint pathId)
|
||||||
{
|
{
|
||||||
if (!HasEscortState(SmartEscortState.Escorting))
|
if (!HasEscortState(SmartEscortState.Escorting))
|
||||||
@@ -801,16 +796,6 @@ namespace Game.AI
|
|||||||
me.SetDisableGravity(disable);
|
me.SetDisableGravity(disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCanFly(bool fly = true)
|
|
||||||
{
|
|
||||||
me.SetCanFly(fly);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetSwim(bool swim)
|
|
||||||
{
|
|
||||||
me.SetSwim(swim);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEvadeDisabled(bool disable)
|
public void SetEvadeDisabled(bool disable)
|
||||||
{
|
{
|
||||||
_evadeDisabled = disable;
|
_evadeDisabled = disable;
|
||||||
|
|||||||
@@ -580,7 +580,6 @@ namespace Game.AI
|
|||||||
SmartEvents.PassengerBoarded => Marshal.SizeOf(typeof(SmartEvent.MinMax)),
|
SmartEvents.PassengerBoarded => Marshal.SizeOf(typeof(SmartEvent.MinMax)),
|
||||||
SmartEvents.PassengerRemoved => Marshal.SizeOf(typeof(SmartEvent.MinMax)),
|
SmartEvents.PassengerRemoved => Marshal.SizeOf(typeof(SmartEvent.MinMax)),
|
||||||
SmartEvents.Charmed => Marshal.SizeOf(typeof(SmartEvent.Charm)),
|
SmartEvents.Charmed => Marshal.SizeOf(typeof(SmartEvent.Charm)),
|
||||||
SmartEvents.CharmedTarget => 0,
|
|
||||||
SmartEvents.SpellHitTarget => Marshal.SizeOf(typeof(SmartEvent.SpellHit)),
|
SmartEvents.SpellHitTarget => Marshal.SizeOf(typeof(SmartEvent.SpellHit)),
|
||||||
SmartEvents.Damaged => Marshal.SizeOf(typeof(SmartEvent.MinMaxRepeat)),
|
SmartEvents.Damaged => Marshal.SizeOf(typeof(SmartEvent.MinMaxRepeat)),
|
||||||
SmartEvents.DamagedTarget => Marshal.SizeOf(typeof(SmartEvent.MinMaxRepeat)),
|
SmartEvents.DamagedTarget => Marshal.SizeOf(typeof(SmartEvent.MinMaxRepeat)),
|
||||||
@@ -589,7 +588,6 @@ namespace Game.AI
|
|||||||
SmartEvents.CorpseRemoved => 0,
|
SmartEvents.CorpseRemoved => 0,
|
||||||
SmartEvents.AiInit => 0,
|
SmartEvents.AiInit => 0,
|
||||||
SmartEvents.DataSet => Marshal.SizeOf(typeof(SmartEvent.DataSet)),
|
SmartEvents.DataSet => Marshal.SizeOf(typeof(SmartEvent.DataSet)),
|
||||||
SmartEvents.WaypointStart => Marshal.SizeOf(typeof(SmartEvent.Waypoint)),
|
|
||||||
SmartEvents.WaypointReached => Marshal.SizeOf(typeof(SmartEvent.Waypoint)),
|
SmartEvents.WaypointReached => Marshal.SizeOf(typeof(SmartEvent.Waypoint)),
|
||||||
SmartEvents.TransportAddplayer => 0,
|
SmartEvents.TransportAddplayer => 0,
|
||||||
SmartEvents.TransportAddcreature => Marshal.SizeOf(typeof(SmartEvent.TransportAddCreature)),
|
SmartEvents.TransportAddcreature => Marshal.SizeOf(typeof(SmartEvent.TransportAddCreature)),
|
||||||
@@ -616,7 +614,6 @@ namespace Game.AI
|
|||||||
SmartEvents.JustCreated => 0,
|
SmartEvents.JustCreated => 0,
|
||||||
SmartEvents.GossipHello => Marshal.SizeOf(typeof(SmartEvent.GossipHello)),
|
SmartEvents.GossipHello => Marshal.SizeOf(typeof(SmartEvent.GossipHello)),
|
||||||
SmartEvents.FollowCompleted => 0,
|
SmartEvents.FollowCompleted => 0,
|
||||||
SmartEvents.PhaseChange => Marshal.SizeOf(typeof(SmartEvent.EventPhaseChange)),
|
|
||||||
SmartEvents.GameEventStart => Marshal.SizeOf(typeof(SmartEvent.GameEvent)),
|
SmartEvents.GameEventStart => Marshal.SizeOf(typeof(SmartEvent.GameEvent)),
|
||||||
SmartEvents.GameEventEnd => Marshal.SizeOf(typeof(SmartEvent.GameEvent)),
|
SmartEvents.GameEventEnd => Marshal.SizeOf(typeof(SmartEvent.GameEvent)),
|
||||||
SmartEvents.GoLootStateChanged => Marshal.SizeOf(typeof(SmartEvent.GoLootStateChanged)),
|
SmartEvents.GoLootStateChanged => Marshal.SizeOf(typeof(SmartEvent.GoLootStateChanged)),
|
||||||
@@ -729,7 +726,6 @@ namespace Game.AI
|
|||||||
SmartActions.RemoveItem => Marshal.SizeOf(typeof(SmartAction.Item)),
|
SmartActions.RemoveItem => Marshal.SizeOf(typeof(SmartAction.Item)),
|
||||||
SmartActions.SetRun => Marshal.SizeOf(typeof(SmartAction.SetRun)),
|
SmartActions.SetRun => Marshal.SizeOf(typeof(SmartAction.SetRun)),
|
||||||
SmartActions.SetDisableGravity => Marshal.SizeOf(typeof(SmartAction.SetDisableGravity)),
|
SmartActions.SetDisableGravity => Marshal.SizeOf(typeof(SmartAction.SetDisableGravity)),
|
||||||
SmartActions.SetSwim => Marshal.SizeOf(typeof(SmartAction.SetSwim)),
|
|
||||||
SmartActions.Teleport => Marshal.SizeOf(typeof(SmartAction.Teleport)),
|
SmartActions.Teleport => Marshal.SizeOf(typeof(SmartAction.Teleport)),
|
||||||
SmartActions.SetCounter => Marshal.SizeOf(typeof(SmartAction.SetCounter)),
|
SmartActions.SetCounter => Marshal.SizeOf(typeof(SmartAction.SetCounter)),
|
||||||
SmartActions.StoreTargetList => Marshal.SizeOf(typeof(SmartAction.StoreTargets)),
|
SmartActions.StoreTargetList => Marshal.SizeOf(typeof(SmartAction.StoreTargets)),
|
||||||
@@ -744,8 +740,6 @@ namespace Game.AI
|
|||||||
SmartActions.TriggerTimedEvent => Marshal.SizeOf(typeof(SmartAction.TimeEvent)),
|
SmartActions.TriggerTimedEvent => Marshal.SizeOf(typeof(SmartAction.TimeEvent)),
|
||||||
SmartActions.RemoveTimedEvent => Marshal.SizeOf(typeof(SmartAction.TimeEvent)),
|
SmartActions.RemoveTimedEvent => Marshal.SizeOf(typeof(SmartAction.TimeEvent)),
|
||||||
SmartActions.AddAura => Marshal.SizeOf(typeof(SmartAction.AddAura)),
|
SmartActions.AddAura => Marshal.SizeOf(typeof(SmartAction.AddAura)),
|
||||||
SmartActions.OverrideScriptBaseObject => 0,
|
|
||||||
SmartActions.ResetScriptBaseObject => 0,
|
|
||||||
SmartActions.CallScriptReset => 0,
|
SmartActions.CallScriptReset => 0,
|
||||||
SmartActions.SetRangedMovement => Marshal.SizeOf(typeof(SmartAction.SetRangedMovement)),
|
SmartActions.SetRangedMovement => Marshal.SizeOf(typeof(SmartAction.SetRangedMovement)),
|
||||||
SmartActions.CallTimedActionlist => Marshal.SizeOf(typeof(SmartAction.TimedActionList)),
|
SmartActions.CallTimedActionlist => Marshal.SizeOf(typeof(SmartAction.TimedActionList)),
|
||||||
@@ -786,14 +780,9 @@ namespace Game.AI
|
|||||||
SmartActions.SetCorpseDelay => Marshal.SizeOf(typeof(SmartAction.CorpseDelay)),
|
SmartActions.SetCorpseDelay => Marshal.SizeOf(typeof(SmartAction.CorpseDelay)),
|
||||||
SmartActions.DisableEvade => Marshal.SizeOf(typeof(SmartAction.DisableEvade)),
|
SmartActions.DisableEvade => Marshal.SizeOf(typeof(SmartAction.DisableEvade)),
|
||||||
SmartActions.GoSetGoState => Marshal.SizeOf(typeof(SmartAction.GoState)),
|
SmartActions.GoSetGoState => Marshal.SizeOf(typeof(SmartAction.GoState)),
|
||||||
SmartActions.SetCanFly => Marshal.SizeOf(typeof(SmartAction.SetFly)),
|
|
||||||
SmartActions.RemoveAurasByType => Marshal.SizeOf(typeof(SmartAction.AuraType)),
|
|
||||||
SmartActions.SetSightDist => Marshal.SizeOf(typeof(SmartAction.SightDistance)),
|
|
||||||
SmartActions.Flee => Marshal.SizeOf(typeof(SmartAction.Flee)),
|
|
||||||
SmartActions.AddThreat => Marshal.SizeOf(typeof(SmartAction.Threat)),
|
SmartActions.AddThreat => Marshal.SizeOf(typeof(SmartAction.Threat)),
|
||||||
SmartActions.LoadEquipment => Marshal.SizeOf(typeof(SmartAction.LoadEquipment)),
|
SmartActions.LoadEquipment => Marshal.SizeOf(typeof(SmartAction.LoadEquipment)),
|
||||||
SmartActions.TriggerRandomTimedEvent => Marshal.SizeOf(typeof(SmartAction.RandomTimedEvent)),
|
SmartActions.TriggerRandomTimedEvent => Marshal.SizeOf(typeof(SmartAction.RandomTimedEvent)),
|
||||||
SmartActions.RemoveAllGameobjects => 0,
|
|
||||||
SmartActions.PauseMovement => Marshal.SizeOf(typeof(SmartAction.PauseMovement)),
|
SmartActions.PauseMovement => Marshal.SizeOf(typeof(SmartAction.PauseMovement)),
|
||||||
SmartActions.PlayAnimkit => Marshal.SizeOf(typeof(SmartAction.AnimKit)),
|
SmartActions.PlayAnimkit => Marshal.SizeOf(typeof(SmartAction.AnimKit)),
|
||||||
SmartActions.ScenePlay => Marshal.SizeOf(typeof(SmartAction.Scene)),
|
SmartActions.ScenePlay => Marshal.SizeOf(typeof(SmartAction.Scene)),
|
||||||
@@ -1141,27 +1130,6 @@ namespace Game.AI
|
|||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartEvents.PhaseChange:
|
|
||||||
{
|
|
||||||
if (e.Event.eventPhaseChange.phasemask == 0)
|
|
||||||
{
|
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has no param set, event won't be executed!.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.Event.eventPhaseChange.phasemask > (uint)SmartEventPhaseBits.All)
|
|
||||||
{
|
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} uses invalid phasemask {e.Event.eventPhaseChange.phasemask}, skipped.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.Event.event_phase_mask != 0 && (e.Event.event_phase_mask & e.Event.eventPhaseChange.phasemask) == 0)
|
|
||||||
{
|
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} uses event phasemask {e.Event.event_phase_mask} and incompatible event_param1 {e.Event.eventPhaseChange.phasemask}, skipped.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartEvents.GameEventStart:
|
case SmartEvents.GameEventStart:
|
||||||
case SmartEvents.GameEventEnd:
|
case SmartEvents.GameEventEnd:
|
||||||
{
|
{
|
||||||
@@ -1304,7 +1272,6 @@ namespace Game.AI
|
|||||||
case SmartEvents.TimedEventTriggered:
|
case SmartEvents.TimedEventTriggered:
|
||||||
case SmartEvents.InstancePlayerEnter:
|
case SmartEvents.InstancePlayerEnter:
|
||||||
case SmartEvents.TransportRelocate:
|
case SmartEvents.TransportRelocate:
|
||||||
case SmartEvents.CharmedTarget:
|
|
||||||
case SmartEvents.CorpseRemoved:
|
case SmartEvents.CorpseRemoved:
|
||||||
case SmartEvents.AiInit:
|
case SmartEvents.AiInit:
|
||||||
case SmartEvents.TransportAddplayer:
|
case SmartEvents.TransportAddplayer:
|
||||||
@@ -1314,7 +1281,6 @@ namespace Game.AI
|
|||||||
case SmartEvents.Evade:
|
case SmartEvents.Evade:
|
||||||
case SmartEvents.ReachedHome:
|
case SmartEvents.ReachedHome:
|
||||||
case SmartEvents.JustSummoned:
|
case SmartEvents.JustSummoned:
|
||||||
case SmartEvents.WaypointStart:
|
|
||||||
case SmartEvents.WaypointReached:
|
case SmartEvents.WaypointReached:
|
||||||
case SmartEvents.WaypointPaused:
|
case SmartEvents.WaypointPaused:
|
||||||
case SmartEvents.WaypointResumed:
|
case SmartEvents.WaypointResumed:
|
||||||
@@ -1335,6 +1301,9 @@ namespace Game.AI
|
|||||||
case SmartEvents.TargetHealthPct:
|
case SmartEvents.TargetHealthPct:
|
||||||
case SmartEvents.FriendlyHealth:
|
case SmartEvents.FriendlyHealth:
|
||||||
case SmartEvents.TargetManaPct:
|
case SmartEvents.TargetManaPct:
|
||||||
|
case SmartEvents.CharmedTarget:
|
||||||
|
case SmartEvents.WaypointStart:
|
||||||
|
case SmartEvents.PhaseChange:
|
||||||
case SmartEvents.IsBehindTarget:
|
case SmartEvents.IsBehindTarget:
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: Unused event_type {e} skipped.");
|
Log.outError(LogFilter.Sql, $"SmartAIMgr: Unused event_type {e} skipped.");
|
||||||
return false;
|
return false;
|
||||||
@@ -1342,19 +1311,6 @@ namespace Game.AI
|
|||||||
Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Not handled event_type({0}), Entry {1} SourceType {2} Event {3} Action {4}, skipped.", e.GetEventType(), e.EntryOrGuid, e.GetScriptType(), e.EventId, e.GetActionType());
|
Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Not handled event_type({0}), Entry {1} SourceType {2} Event {3} Action {4}, skipped.", e.GetEventType(), e.EntryOrGuid, e.GetScriptType(), e.EventId, e.GetActionType());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional check for deprecated
|
|
||||||
switch (e.GetEventType())
|
|
||||||
{
|
|
||||||
// Deprecated
|
|
||||||
case SmartEvents.PhaseChange:
|
|
||||||
case SmartEvents.WaypointStart:
|
|
||||||
case SmartEvents.CharmedTarget:
|
|
||||||
Log.outWarn(LogFilter.Sql, "SmartAIMgr: Deprecated event_type: {e}, it might be removed in the future, loaded for now.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CheckUnusedEventParams(e))
|
if (!CheckUnusedEventParams(e))
|
||||||
@@ -1826,15 +1782,6 @@ namespace Game.AI
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.RemoveAurasByType:
|
|
||||||
{
|
|
||||||
if (e.Action.auraType.type >= (uint)AuraType.Total)
|
|
||||||
{
|
|
||||||
Log.outError(LogFilter.Sql, $"Entry {e.EntryOrGuid} SourceType {e.GetScriptType()} Event {e.EventId} Action {e.GetActionType()} uses invalid data type {e.Action.auraType.type} (value range 0-TOTAL_AURAS), skipped.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.RespawnBySpawnId:
|
case SmartActions.RespawnBySpawnId:
|
||||||
{
|
{
|
||||||
if (Global.ObjectMgr.GetSpawnData((SpawnObjectType)e.Action.respawnData.spawnType, e.Action.respawnData.spawnId) == null)
|
if (Global.ObjectMgr.GetSpawnData((SpawnObjectType)e.Action.respawnData.spawnType, e.Action.respawnData.spawnId) == null)
|
||||||
@@ -1985,16 +1932,6 @@ namespace Game.AI
|
|||||||
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.setDisableGravity.disable);
|
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.setDisableGravity.disable);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.SetCanFly:
|
|
||||||
{
|
|
||||||
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.setFly.fly);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.SetSwim:
|
|
||||||
{
|
|
||||||
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.setSwim.swim);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.SetCounter:
|
case SmartActions.SetCounter:
|
||||||
{
|
{
|
||||||
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.setCounter.reset);
|
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.setCounter.reset);
|
||||||
@@ -2113,8 +2050,6 @@ namespace Game.AI
|
|||||||
case SmartActions.CloseGossip:
|
case SmartActions.CloseGossip:
|
||||||
case SmartActions.TriggerTimedEvent:
|
case SmartActions.TriggerTimedEvent:
|
||||||
case SmartActions.RemoveTimedEvent:
|
case SmartActions.RemoveTimedEvent:
|
||||||
case SmartActions.OverrideScriptBaseObject:
|
|
||||||
case SmartActions.ResetScriptBaseObject:
|
|
||||||
case SmartActions.ActivateGobject:
|
case SmartActions.ActivateGobject:
|
||||||
case SmartActions.CallScriptReset:
|
case SmartActions.CallScriptReset:
|
||||||
case SmartActions.SetRangedMovement:
|
case SmartActions.SetRangedMovement:
|
||||||
@@ -2138,11 +2073,8 @@ namespace Game.AI
|
|||||||
case SmartActions.SummonCreatureGroup:
|
case SmartActions.SummonCreatureGroup:
|
||||||
case SmartActions.MoveOffset:
|
case SmartActions.MoveOffset:
|
||||||
case SmartActions.SetCorpseDelay:
|
case SmartActions.SetCorpseDelay:
|
||||||
case SmartActions.SetSightDist:
|
|
||||||
case SmartActions.Flee:
|
|
||||||
case SmartActions.AddThreat:
|
case SmartActions.AddThreat:
|
||||||
case SmartActions.TriggerRandomTimedEvent:
|
case SmartActions.TriggerRandomTimedEvent:
|
||||||
case SmartActions.RemoveAllGameobjects:
|
|
||||||
case SmartActions.SpawnSpawngroup:
|
case SmartActions.SpawnSpawngroup:
|
||||||
case SmartActions.AddToStoredTargetList:
|
case SmartActions.AddToStoredTargetList:
|
||||||
break;
|
break;
|
||||||
@@ -2159,32 +2091,22 @@ namespace Game.AI
|
|||||||
case SmartActions.SetUnitFlag:
|
case SmartActions.SetUnitFlag:
|
||||||
case SmartActions.RemoveUnitFlag:
|
case SmartActions.RemoveUnitFlag:
|
||||||
case SmartActions.InstallAITemplate:
|
case SmartActions.InstallAITemplate:
|
||||||
case SmartActions.SetDynamicFlag:
|
|
||||||
case SmartActions.AddDynamicFlag:
|
|
||||||
case SmartActions.RemoveDynamicFlag:
|
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: Unused action_type: {e} Skipped.");
|
|
||||||
return false;
|
|
||||||
default:
|
|
||||||
Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Not handled action_type({0}), event_type({1}), Entry {2} SourceType {3} Event {4}, skipped.", e.GetActionType(), e.GetEventType(), e.EntryOrGuid, e.GetScriptType(), e.EventId);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Additional check for deprecated
|
|
||||||
switch (e.GetActionType())
|
|
||||||
{
|
|
||||||
// Deprecated
|
|
||||||
case SmartActions.SetSwim:
|
case SmartActions.SetSwim:
|
||||||
case SmartActions.OverrideScriptBaseObject:
|
case SmartActions.OverrideScriptBaseObject:
|
||||||
case SmartActions.ResetScriptBaseObject:
|
case SmartActions.ResetScriptBaseObject:
|
||||||
|
case SmartActions.SetDynamicFlag:
|
||||||
|
case SmartActions.AddDynamicFlag:
|
||||||
|
case SmartActions.RemoveDynamicFlag:
|
||||||
case SmartActions.SetCanFly:
|
case SmartActions.SetCanFly:
|
||||||
case SmartActions.RemoveAurasByType:
|
case SmartActions.RemoveAurasByType:
|
||||||
case SmartActions.SetSightDist:
|
case SmartActions.SetSightDist:
|
||||||
case SmartActions.Flee:
|
case SmartActions.Flee:
|
||||||
case SmartActions.RemoveAllGameobjects:
|
case SmartActions.RemoveAllGameobjects:
|
||||||
Log.outWarn(LogFilter.Sql, $"SmartAIMgr: Deprecated action_type: {e}, it might be removed in the future, loaded for now.");
|
Log.outError(LogFilter.Sql, $"SmartAIMgr: Unused action_type: {e} Skipped.");
|
||||||
break;
|
return false;
|
||||||
default:
|
default:
|
||||||
break;
|
Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Not handled action_type({0}), event_type({1}), Entry {2} SourceType {3} Event {4}, skipped.", e.GetActionType(), e.GetEventType(), e.EntryOrGuid, e.GetScriptType(), e.EventId);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CheckUnusedActionParams(e))
|
if (!CheckUnusedActionParams(e))
|
||||||
@@ -2654,9 +2576,6 @@ namespace Game.AI
|
|||||||
[FieldOffset(16)]
|
[FieldOffset(16)]
|
||||||
public Gossip gossip;
|
public Gossip gossip;
|
||||||
|
|
||||||
[FieldOffset(16)]
|
|
||||||
public EventPhaseChange eventPhaseChange;
|
|
||||||
|
|
||||||
[FieldOffset(16)]
|
[FieldOffset(16)]
|
||||||
public GameEvent gameEvent;
|
public GameEvent gameEvent;
|
||||||
|
|
||||||
@@ -2833,10 +2752,6 @@ namespace Game.AI
|
|||||||
public uint sender;
|
public uint sender;
|
||||||
public uint action;
|
public uint action;
|
||||||
}
|
}
|
||||||
public struct EventPhaseChange
|
|
||||||
{
|
|
||||||
public uint phasemask;
|
|
||||||
}
|
|
||||||
public struct GameEvent
|
public struct GameEvent
|
||||||
{
|
{
|
||||||
public uint gameEventId;
|
public uint gameEventId;
|
||||||
@@ -3040,12 +2955,6 @@ namespace Game.AI
|
|||||||
[FieldOffset(4)]
|
[FieldOffset(4)]
|
||||||
public SetDisableGravity setDisableGravity;
|
public SetDisableGravity setDisableGravity;
|
||||||
|
|
||||||
[FieldOffset(4)]
|
|
||||||
public SetFly setFly;
|
|
||||||
|
|
||||||
[FieldOffset(4)]
|
|
||||||
public SetSwim setSwim;
|
|
||||||
|
|
||||||
[FieldOffset(4)]
|
[FieldOffset(4)]
|
||||||
public Teleport teleport;
|
public Teleport teleport;
|
||||||
|
|
||||||
@@ -3094,9 +3003,6 @@ namespace Game.AI
|
|||||||
[FieldOffset(4)]
|
[FieldOffset(4)]
|
||||||
public FleeAssist fleeAssist;
|
public FleeAssist fleeAssist;
|
||||||
|
|
||||||
[FieldOffset(4)]
|
|
||||||
public Flee flee;
|
|
||||||
|
|
||||||
[FieldOffset(4)]
|
[FieldOffset(4)]
|
||||||
public EnableTempGO enableTempGO;
|
public EnableTempGO enableTempGO;
|
||||||
|
|
||||||
@@ -3154,9 +3060,6 @@ namespace Game.AI
|
|||||||
[FieldOffset(4)]
|
[FieldOffset(4)]
|
||||||
public AuraType auraType;
|
public AuraType auraType;
|
||||||
|
|
||||||
[FieldOffset(4)]
|
|
||||||
public SightDistance sightDistance;
|
|
||||||
|
|
||||||
[FieldOffset(4)]
|
[FieldOffset(4)]
|
||||||
public LoadEquipment loadEquipment;
|
public LoadEquipment loadEquipment;
|
||||||
|
|
||||||
@@ -3479,14 +3382,6 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
public uint disable;
|
public uint disable;
|
||||||
}
|
}
|
||||||
public struct SetFly
|
|
||||||
{
|
|
||||||
public uint fly;
|
|
||||||
}
|
|
||||||
public struct SetSwim
|
|
||||||
{
|
|
||||||
public uint swim;
|
|
||||||
}
|
|
||||||
public struct Teleport
|
public struct Teleport
|
||||||
{
|
{
|
||||||
public uint mapID;
|
public uint mapID;
|
||||||
@@ -3575,10 +3470,6 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
public uint withEmote;
|
public uint withEmote;
|
||||||
}
|
}
|
||||||
public struct Flee
|
|
||||||
{
|
|
||||||
public uint fleeTime;
|
|
||||||
}
|
|
||||||
public struct EnableTempGO
|
public struct EnableTempGO
|
||||||
{
|
{
|
||||||
public uint duration;
|
public uint duration;
|
||||||
@@ -3672,14 +3563,6 @@ namespace Game.AI
|
|||||||
public uint maxDelay;
|
public uint maxDelay;
|
||||||
public uint spawnflags;
|
public uint spawnflags;
|
||||||
}
|
}
|
||||||
public struct AuraType
|
|
||||||
{
|
|
||||||
public uint type;
|
|
||||||
}
|
|
||||||
public struct SightDistance
|
|
||||||
{
|
|
||||||
public uint dist;
|
|
||||||
}
|
|
||||||
public struct LoadEquipment
|
public struct LoadEquipment
|
||||||
{
|
{
|
||||||
public uint id;
|
public uint id;
|
||||||
|
|||||||
@@ -1261,14 +1261,6 @@ namespace Game.AI
|
|||||||
((SmartAI)_me.GetAI()).SetDisableGravity(e.Action.setDisableGravity.disable != 0);
|
((SmartAI)_me.GetAI()).SetDisableGravity(e.Action.setDisableGravity.disable != 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.SetCanFly:
|
|
||||||
{
|
|
||||||
if (!IsSmart())
|
|
||||||
break;
|
|
||||||
|
|
||||||
((SmartAI)_me.GetAI()).SetCanFly(e.Action.setFly.fly != 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.SetRun:
|
case SmartActions.SetRun:
|
||||||
{
|
{
|
||||||
if (!IsSmart())
|
if (!IsSmart())
|
||||||
@@ -1277,14 +1269,6 @@ namespace Game.AI
|
|||||||
((SmartAI)_me.GetAI()).SetRun(e.Action.setRun.run != 0);
|
((SmartAI)_me.GetAI()).SetRun(e.Action.setRun.run != 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.SetSwim:
|
|
||||||
{
|
|
||||||
if (!IsSmart())
|
|
||||||
break;
|
|
||||||
|
|
||||||
((SmartAI)_me.GetAI()).SetSwim(e.Action.setSwim.swim != 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.SetCounter:
|
case SmartActions.SetCounter:
|
||||||
{
|
{
|
||||||
if (!targets.Empty())
|
if (!targets.Empty())
|
||||||
@@ -1534,36 +1518,6 @@ namespace Game.AI
|
|||||||
case SmartActions.RemoveTimedEvent:
|
case SmartActions.RemoveTimedEvent:
|
||||||
_remIDs.Add(e.Action.timeEvent.id);
|
_remIDs.Add(e.Action.timeEvent.id);
|
||||||
break;
|
break;
|
||||||
case SmartActions.OverrideScriptBaseObject:
|
|
||||||
{
|
|
||||||
foreach (var target in targets)
|
|
||||||
{
|
|
||||||
if (IsCreature(target))
|
|
||||||
{
|
|
||||||
if (_meOrigGUID.IsEmpty() && _me)
|
|
||||||
_meOrigGUID = _me.GetGUID();
|
|
||||||
if (_goOrigGUID.IsEmpty() && _go)
|
|
||||||
_goOrigGUID = _go.GetGUID();
|
|
||||||
_go = null;
|
|
||||||
_me = target.ToCreature();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (IsGameObject(target))
|
|
||||||
{
|
|
||||||
if (_meOrigGUID.IsEmpty() && _me)
|
|
||||||
_meOrigGUID = _me.GetGUID();
|
|
||||||
if (_goOrigGUID.IsEmpty() && _go)
|
|
||||||
_goOrigGUID = _go.GetGUID();
|
|
||||||
_go = target.ToGameObject();
|
|
||||||
_me = null;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.ResetScriptBaseObject:
|
|
||||||
ResetBaseObject();
|
|
||||||
break;
|
|
||||||
case SmartActions.CallScriptReset:
|
case SmartActions.CallScriptReset:
|
||||||
SetPhase(0);
|
SetPhase(0);
|
||||||
OnReset();
|
OnReset();
|
||||||
@@ -2222,30 +2176,6 @@ namespace Game.AI
|
|||||||
((SmartAI)_me.GetAI()).SetEvadeDisabled(e.Action.disableEvade.disable != 0);
|
((SmartAI)_me.GetAI()).SetEvadeDisabled(e.Action.disableEvade.disable != 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.RemoveAurasByType: // can be used to exit vehicle for example
|
|
||||||
{
|
|
||||||
foreach (var target in targets)
|
|
||||||
if (IsUnit(target))
|
|
||||||
target.ToUnit().RemoveAurasByType((AuraType)e.Action.auraType.type);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.SetSightDist:
|
|
||||||
{
|
|
||||||
foreach (var target in targets)
|
|
||||||
if (IsCreature(target))
|
|
||||||
target.ToCreature().m_SightDistance = e.Action.sightDistance.dist;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.Flee:
|
|
||||||
{
|
|
||||||
foreach (var target in targets)
|
|
||||||
if (IsCreature(target))
|
|
||||||
target.ToCreature().GetMotionMaster().MoveFleeing(_me, e.Action.flee.fleeTime);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.AddThreat:
|
case SmartActions.AddThreat:
|
||||||
{
|
{
|
||||||
if (!_me.CanHaveThreatList())
|
if (!_me.CanHaveThreatList())
|
||||||
@@ -2271,15 +2201,6 @@ namespace Game.AI
|
|||||||
ProcessEventsFor(SmartEvents.TimedEventTriggered, null, eventId);
|
ProcessEventsFor(SmartEvents.TimedEventTriggered, null, eventId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SmartActions.RemoveAllGameobjects:
|
|
||||||
{
|
|
||||||
foreach (var target in targets)
|
|
||||||
if (IsUnit(target))
|
|
||||||
target.ToUnit().RemoveAllGameObjects();
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartActions.PauseMovement:
|
case SmartActions.PauseMovement:
|
||||||
{
|
{
|
||||||
foreach (var target in targets)
|
foreach (var target in targets)
|
||||||
@@ -3244,7 +3165,6 @@ namespace Game.AI
|
|||||||
case SmartEvents.Death:
|
case SmartEvents.Death:
|
||||||
case SmartEvents.Evade:
|
case SmartEvents.Evade:
|
||||||
case SmartEvents.ReachedHome:
|
case SmartEvents.ReachedHome:
|
||||||
case SmartEvents.CharmedTarget:
|
|
||||||
case SmartEvents.CorpseRemoved:
|
case SmartEvents.CorpseRemoved:
|
||||||
case SmartEvents.AiInit:
|
case SmartEvents.AiInit:
|
||||||
case SmartEvents.TransportAddplayer:
|
case SmartEvents.TransportAddplayer:
|
||||||
@@ -3405,7 +3325,6 @@ namespace Game.AI
|
|||||||
ProcessAction(e, unit, var0);
|
ProcessAction(e, unit, var0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartEvents.WaypointStart:
|
|
||||||
case SmartEvents.WaypointReached:
|
case SmartEvents.WaypointReached:
|
||||||
case SmartEvents.WaypointResumed:
|
case SmartEvents.WaypointResumed:
|
||||||
case SmartEvents.WaypointPaused:
|
case SmartEvents.WaypointPaused:
|
||||||
@@ -3494,14 +3413,6 @@ namespace Game.AI
|
|||||||
ProcessAction(e, unit, var0, var1);
|
ProcessAction(e, unit, var0, var1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartEvents.PhaseChange:
|
|
||||||
{
|
|
||||||
if (!IsInPhase(e.Event.eventPhaseChange.phasemask))
|
|
||||||
return;
|
|
||||||
|
|
||||||
ProcessAction(e, GetLastInvoker());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SmartEvents.GameEventStart:
|
case SmartEvents.GameEventStart:
|
||||||
case SmartEvents.GameEventEnd:
|
case SmartEvents.GameEventEnd:
|
||||||
{
|
{
|
||||||
@@ -4399,12 +4310,7 @@ namespace Game.AI
|
|||||||
}
|
}
|
||||||
void SetPhase(uint p)
|
void SetPhase(uint p)
|
||||||
{
|
{
|
||||||
uint oldPhase = _eventPhase;
|
|
||||||
|
|
||||||
_eventPhase = p;
|
_eventPhase = p;
|
||||||
|
|
||||||
if (oldPhase != _eventPhase)
|
|
||||||
ProcessEventsFor(SmartEvents.PhaseChange);
|
|
||||||
}
|
}
|
||||||
bool IsInPhase(uint p)
|
bool IsInPhase(uint p)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user