mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-02 15:17:27 +01:00
*Add config option CheckDB to check if the contents in FULL folder are applied.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user