mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user