From 00b7cabd80335b82335b7ece752a08fe1ca605df Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 25 Oct 2016 23:34:59 -0300 Subject: [PATCH] Core/Globals: abort server startup if there are wrong factions in DB Closes #18127 --- src/server/game/Globals/ObjectMgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 535ef9e0478..8fb7d29ae26 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -846,7 +846,10 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction); if (!factionTemplate) - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction template (%u).", cInfo->Entry, cInfo->faction); + { + 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(); + } // used later for scale CreatureDisplayInfoEntry const* displayScaleEntry = NULL;