Skip to content

Commit

Permalink
Core/Configuration: Set default value of "Expansion" config to CURREN…
Browse files Browse the repository at this point in the history
…T_EXPANSION (whatever the value at the moment is) and prevent setting LOCALE_none as dbc locale
  • Loading branch information
Shauren committed Feb 17, 2016
1 parent b6b5665 commit 5e06fdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/game/World/World.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5e06fdf

Please sign in to comment.