Core/ObjectMgr: Replace ABORT() with defaulting to faction 35 when faction template does not exist in DB (#20655)

This commit is contained in:
Duarte Duarte
2017-10-19 21:59:02 +01:00
committed by Shauren
parent 83d3c117f9
commit b5b03a7be0

View File

@@ -870,8 +870,8 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction);
if (!factionTemplate)
{
TC_LOG_FATAL("sql.sql", "Creature (Entry: %u) has non-existing faction template (%u). This can lead to crashes, aborting.", cInfo->Entry, cInfo->faction);
ABORT();
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction template (%u). This can lead to crashes, set to faction 35.", cInfo->Entry, cInfo->faction);
factionTemplate = sFactionTemplateStore.AssertEntry(35);
}
// used later for scale