From 5e06fdfcc354e30f074e8cafd9f88db09e0ca669 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 17 Feb 2016 23:41:26 +0100 Subject: Core/Configuration: Set default value of "Expansion" config to CURRENT_EXPANSION (whatever the value at the moment is) and prevent setting LOCALE_none as dbc locale --- src/server/game/World/World.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server') diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 972860f790f..331c2114b4e 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -427,9 +427,9 @@ void World::LoadConfigSettings(bool reload) m_defaultDbcLocale = LocaleConstant(sConfigMgr->GetIntDefault("DBC.Locale", 0)); - if (m_defaultDbcLocale >= TOTAL_LOCALES || m_defaultDbcLocale < LOCALE_enUS) + if (m_defaultDbcLocale >= TOTAL_LOCALES || m_defaultDbcLocale < LOCALE_enUS || m_defaultDbcLocale == LOCALE_none) { - TC_LOG_ERROR("server.loading", "Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES); + TC_LOG_ERROR("server.loading", "Incorrect DBC.Locale! Must be >= 0 and < %d and not %d (set to 0)", TOTAL_LOCALES, LOCALE_none); m_defaultDbcLocale = LOCALE_enUS; } @@ -1044,12 +1044,12 @@ void World::LoadConfigSettings(bool reload) if (reload) { - uint32 val = sConfigMgr->GetIntDefault("Expansion", 2); + uint32 val = sConfigMgr->GetIntDefault("Expansion", CURRENT_EXPANSION); if (val != m_int_configs[CONFIG_EXPANSION]) TC_LOG_ERROR("server.loading", "Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]); } else - m_int_configs[CONFIG_EXPANSION] = sConfigMgr->GetIntDefault("Expansion", 2); + m_int_configs[CONFIG_EXPANSION] = sConfigMgr->GetIntDefault("Expansion", CURRENT_EXPANSION); m_int_configs[CONFIG_CHATFLOOD_MESSAGE_COUNT] = sConfigMgr->GetIntDefault("ChatFlood.MessageCount", 10); m_int_configs[CONFIG_CHATFLOOD_MESSAGE_DELAY] = sConfigMgr->GetIntDefault("ChatFlood.MessageDelay", 1); -- cgit v1.2.3