Core/SAI: SMART_ACTION_SET_FACTION validation should check FactionTemplate(.dbc) and not Faction.
This commit is contained in:
@@ -494,7 +494,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
|||||||
switch (e.GetActionType())
|
switch (e.GetActionType())
|
||||||
{
|
{
|
||||||
case SMART_ACTION_SET_FACTION:
|
case SMART_ACTION_SET_FACTION:
|
||||||
if (e.action.faction.factionID && !sFactionStore.LookupEntry(e.action.faction.factionID))
|
if (e.action.faction.factionID && !sFactionTemplateStore.LookupEntry(e.action.faction.factionID))
|
||||||
{
|
{
|
||||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
|
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user