[11864] Fix SCRIPT_COMMAND_SET_FACTION to check for expected Faction Templates and not factions

Please check your scripts! Note: Similar problems exist in other cases as well.

Signed-off-by: Klark20 <Klark20@online.de>
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Klark20 2011-12-16 01:32:55 +01:00 committed by Schmoozerd
parent ad5755f8ef
commit bcc470ac43
2 changed files with 3 additions and 3 deletions

View file

@ -421,9 +421,9 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
}
case SCRIPT_COMMAND_SET_FACTION:
{
if (tmp.faction.factionId && !sFactionStore.LookupEntry(tmp.faction.factionId))
if (tmp.faction.factionId && !sFactionTemplateStore.LookupEntry(tmp.faction.factionId))
{
sLog.outErrorDb("Table `%s` has datalong2 = %u in SCRIPT_COMMAND_SET_FACTION for script id %u, but this faction does not exist.", tablename, tmp.faction.factionId, tmp.id);
sLog.outErrorDb("Table `%s` has datalong = %u in SCRIPT_COMMAND_SET_FACTION for script id %u, but this faction-template does not exist.", tablename, tmp.faction.factionId, tmp.id);
continue;
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11863"
#define REVISION_NR "11864"
#endif // __REVISION_NR_H__