diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-10-25 23:34:59 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2016-10-25 23:35:53 -0300 |
| commit | d66a809b8e8c3c7530822489865f416741399fcb (patch) | |
| tree | d3db43e2d74b117ab21245a9da621ff8b7a326c5 | |
| parent | 2f03d502f34d0e9f69fd2d23cfb69b1ec8bb8891 (diff) | |
Core/Globals: abort server startup if there are wrong factions in DB
Closes #18127
| -rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 21bb6261971..e594cf7f289 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -804,7 +804,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; |
