[8343] Extand level allowed range for item use to upper values if it end at max player level.

Also add DEFAULT_MAX_LEVEL define for store current used client expection about max player level.
For example for current supported this is 80.
This commit is contained in:
VladimirMangos 2009-08-10 13:08:02 +04:00
parent 6a4b79cdc2
commit 93ed08e886
5 changed files with 24 additions and 7 deletions

View file

@ -673,12 +673,12 @@ void World::LoadConfigSettings(bool reload)
if(reload)
{
uint32 val = sConfig.GetIntDefault("MaxPlayerLevel", 80);
uint32 val = sConfig.GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
if(val!=m_configs[CONFIG_MAX_PLAYER_LEVEL])
sLog.outError("MaxPlayerLevel option can't be changed at mangosd.conf reload, using current value (%u).",m_configs[CONFIG_MAX_PLAYER_LEVEL]);
}
else
m_configs[CONFIG_MAX_PLAYER_LEVEL] = sConfig.GetIntDefault("MaxPlayerLevel", 80);
m_configs[CONFIG_MAX_PLAYER_LEVEL] = sConfig.GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
if(m_configs[CONFIG_MAX_PLAYER_LEVEL] > MAX_LEVEL)
{