aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-10-25 23:34:59 -0300
committerjoschiwald <joschiwald.trinity@gmail.com>2017-10-15 16:59:55 +0200
commit8cc9360da62cb103494024a9a645d6a60094b347 (patch)
tree7e9e772d5a8451afaf7422adae78444919291625
parent175bc752e844be31d77e38c79dd326ef900c6398 (diff)
Core/Globals: abort server startup if there are wrong factions in DB
Closes #18127 (cherry picked from commit d66a809b8e8c3c7530822489865f416741399fcb)
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 07017fe5e78..1633b73cb14 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -869,7 +869,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 = nullptr;