diff options
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r-- | src/game/World.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp index 4c14da07fd5..1db8b7c0478 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1087,6 +1087,7 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false); m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000); m_configs[CONFIG_MIN_LOG_UPDATE] = sConfig.GetIntDefault("MinRecordUpdateTimeDiff", 10); + m_configs[CONFIG_CHECK_DB] = sConfig.GetBoolDefault("CheckDB", true); std::string forbiddenmaps = sConfig.GetStringDefault("ForbiddenMaps", ""); char * forbiddenMaps = new char[forbiddenmaps.length() + 1]; @@ -1485,6 +1486,13 @@ void World::SetInitialWorldSettings() if(!LoadScriptingModule()) exit(1); + /// Check db + if(m_configs[CONFIG_CHECK_DB] && (!objmgr.CheckDB() || !spellmgr.CheckDB())) + { + sLog.outError("Your world DB is outdated. Please reapply sqls in sql\\FULL folder, or disable CheckDB option in config file (not recommended)."); + exit(1); + } + ///- Initialize game time and timers sLog.outDebug( "DEBUG:: Initialize game time and timers" ); m_gameTime = time(NULL); |