Core/SmartScripts: Rename SMART_ACTION_RESPAWN_TARGET -> SMART_ACTION_ENABLE_TEMP_GOBJ, since that's the only thing it still does in the dynspawn model. Adjust body accordingly to warn on misuse.

Port From (https://github.com/TrinityCore/TrinityCore/commit/32997a598992c5be7ad838b52b9e9a185d68d9fb)
This commit is contained in:
hondacrx
2021-08-09 09:57:11 -04:00
parent f2ff234456
commit 08db42917e
3 changed files with 17 additions and 10 deletions
+12 -4
View File
@@ -1397,6 +1397,15 @@ namespace Game.AI
}
break;
}
case SmartActions.EnableTempGobj:
{
if (e.Action.enableTempGO.duration == 0)
{
Log.outError(LogFilter.Sql, $"Entry {e.EntryOrGuid} SourceType {e.GetScriptType()} Event {e.EventId} Action {e.GetActionType()} does not specify duration");
return false;
}
break;
}
case SmartActions.SetMovementSpeed:
{
if (e.Action.movementSpeed.movementType >= (int)MovementGeneratorType.Max)
@@ -1456,7 +1465,6 @@ namespace Game.AI
case SmartActions.RemoveUnitFlag:
case SmartActions.Playmovie:
case SmartActions.MoveToPos:
case SmartActions.RespawnTarget:
case SmartActions.CloseGossip:
case SmartActions.TriggerTimedEvent:
case SmartActions.RemoveTimedEvent:
@@ -2437,7 +2445,7 @@ namespace Game.AI
public Flee flee;
[FieldOffset(4)]
public RespawnTarget respawnTarget;
public EnableTempGO enableTempGO;
[FieldOffset(4)]
public MoveToPos moveToPos;
@@ -2899,9 +2907,9 @@ namespace Game.AI
{
public uint fleeTime;
}
public struct RespawnTarget
public struct EnableTempGO
{
public uint goRespawnTime;
public uint duration;
}
public struct MoveToPos
{