AI/SmartScripts: Warn on startup for ACTION_INVOKER_CAST without invoker (same as invoker targets)
Port From (https://github.com/TrinityCore/TrinityCore/commit/a2d266edf3da950ac4aeaf48b6778f8bbc7bcdd4)
This commit is contained in:
@@ -490,7 +490,7 @@ namespace Game.AI
|
|||||||
case SmartTargets.InvokerParty:
|
case SmartTargets.InvokerParty:
|
||||||
if (e.GetScriptType() != SmartScriptType.TimedActionlist && e.GetEventType() != SmartEvents.Link && !EventHasInvoker(e.Event.type))
|
if (e.GetScriptType() != SmartScriptType.TimedActionlist && e.GetEventType() != SmartEvents.Link && !EventHasInvoker(e.Event.type))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: Entry {e.EntryOrGuid} SourceType {e.GetScriptType()} Event {e.GetEventType()} Action {e.GetActionType()} has invoker target, but action does not provide any invoker!");
|
Log.outError(LogFilter.Sql, $"SmartAIMgr: Entry {e.EntryOrGuid} SourceType {e.GetScriptType()} Event {e.GetEventType()} Action {e.GetActionType()} has invoker target, but event does not provide any invoker!");
|
||||||
// allow this to load for now
|
// allow this to load for now
|
||||||
// return false;
|
// return false;
|
||||||
}
|
}
|
||||||
@@ -1064,8 +1064,16 @@ namespace Game.AI
|
|||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.AddAura:
|
|
||||||
case SmartActions.InvokerCast:
|
case SmartActions.InvokerCast:
|
||||||
|
if (e.GetScriptType() != SmartScriptType.TimedActionlist && e.GetEventType() != SmartEvents.Link && !EventHasInvoker(e.Event.type))
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has invoker cast action, but event does not provide any invoker!");
|
||||||
|
// allow this to load for now
|
||||||
|
// return false;
|
||||||
|
}
|
||||||
|
// no break
|
||||||
|
goto case SmartActions.AddAura;
|
||||||
|
case SmartActions.AddAura:
|
||||||
if (!IsSpellValid(e, e.Action.cast.spell))
|
if (!IsSpellValid(e, e.Action.cast.spell))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user