Core/SAI: SMART_ACTION_SET_FACTION validation should check FactionTemplate(.dbc) and not Faction.

This commit is contained in:
Nay
2011-08-26 05:15:38 +01:00
parent 751cbaf307
commit fac814c87b

View File

@@ -494,7 +494,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
switch (e.GetActionType())
{
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);
return false;