Limit max player level to 100

This commit is contained in:
tomrus88 2008-11-30 14:12:24 +03:00
parent ee7f7a0a08
commit 59fb246652
2 changed files with 21 additions and 21 deletions

View file

@ -744,30 +744,30 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_MIN_PETITION_SIGNS] = sConfig.GetIntDefault("MinPetitionSigns", 9); m_configs[CONFIG_MIN_PETITION_SIGNS] = sConfig.GetIntDefault("MinPetitionSigns", 9);
if(m_configs[CONFIG_MIN_PETITION_SIGNS] > 9) if(m_configs[CONFIG_MIN_PETITION_SIGNS] > 9)
{ {
sLog.outError("MinPetitionSigns (%i) must be in range 0..9. Set to 9.",m_configs[CONFIG_MIN_PETITION_SIGNS]); sLog.outError("MinPetitionSigns (%i) must be in range 0..9. Set to 9.", m_configs[CONFIG_MIN_PETITION_SIGNS]);
m_configs[CONFIG_MIN_PETITION_SIGNS] = 9; m_configs[CONFIG_MIN_PETITION_SIGNS] = 9;
} }
m_configs[CONFIG_GM_LOGIN_STATE] = sConfig.GetIntDefault("GM.LoginState",2); m_configs[CONFIG_GM_LOGIN_STATE] = sConfig.GetIntDefault("GM.LoginState", 2);
m_configs[CONFIG_GM_ACCEPT_TICKETS] = sConfig.GetIntDefault("GM.AcceptTickets",2); m_configs[CONFIG_GM_ACCEPT_TICKETS] = sConfig.GetIntDefault("GM.AcceptTickets", 2);
m_configs[CONFIG_GM_CHAT] = sConfig.GetIntDefault("GM.Chat",2); m_configs[CONFIG_GM_CHAT] = sConfig.GetIntDefault("GM.Chat", 2);
m_configs[CONFIG_GM_WISPERING_TO] = sConfig.GetIntDefault("GM.WhisperingTo",2); m_configs[CONFIG_GM_WISPERING_TO] = sConfig.GetIntDefault("GM.WhisperingTo", 2);
m_configs[CONFIG_GM_IN_GM_LIST] = sConfig.GetBoolDefault("GM.InGMList",false); m_configs[CONFIG_GM_IN_GM_LIST] = sConfig.GetBoolDefault("GM.InGMList", false);
m_configs[CONFIG_GM_IN_WHO_LIST] = sConfig.GetBoolDefault("GM.InWhoList",false); m_configs[CONFIG_GM_IN_WHO_LIST] = sConfig.GetBoolDefault("GM.InWhoList", false);
m_configs[CONFIG_GM_LOG_TRADE] = sConfig.GetBoolDefault("GM.LogTrade", false); m_configs[CONFIG_GM_LOG_TRADE] = sConfig.GetBoolDefault("GM.LogTrade", false);
m_configs[CONFIG_START_GM_LEVEL] = sConfig.GetIntDefault("GM.StartLevel", 1); m_configs[CONFIG_START_GM_LEVEL] = sConfig.GetIntDefault("GM.StartLevel", 1);
if(m_configs[CONFIG_START_GM_LEVEL] < m_configs[CONFIG_START_PLAYER_LEVEL]) if(m_configs[CONFIG_START_GM_LEVEL] < m_configs[CONFIG_START_PLAYER_LEVEL])
{ {
sLog.outError("GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..255. Set to %u.", sLog.outError("GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..100. Set to %u.",
m_configs[CONFIG_START_GM_LEVEL],m_configs[CONFIG_START_PLAYER_LEVEL],m_configs[CONFIG_START_PLAYER_LEVEL]); m_configs[CONFIG_START_GM_LEVEL],m_configs[CONFIG_START_PLAYER_LEVEL], m_configs[CONFIG_START_PLAYER_LEVEL]);
m_configs[CONFIG_START_GM_LEVEL] = m_configs[CONFIG_START_PLAYER_LEVEL]; m_configs[CONFIG_START_GM_LEVEL] = m_configs[CONFIG_START_PLAYER_LEVEL];
} }
else if(m_configs[CONFIG_START_GM_LEVEL] > 255) else if(m_configs[CONFIG_START_GM_LEVEL] > 100)
{ {
sLog.outError("GM.StartLevel (%i) must be in range 1..255. Set to %u.",m_configs[CONFIG_START_GM_LEVEL],255); sLog.outError("GM.StartLevel (%i) must be in range 1..100. Set to %u.", m_configs[CONFIG_START_GM_LEVEL], 100);
m_configs[CONFIG_START_GM_LEVEL] = 255; m_configs[CONFIG_START_GM_LEVEL] = 100;
} }
m_configs[CONFIG_GROUP_VISIBILITY] = sConfig.GetIntDefault("Visibility.GroupMode",0); m_configs[CONFIG_GROUP_VISIBILITY] = sConfig.GetIntDefault("Visibility.GroupMode",0);
@ -859,13 +859,13 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_WORLD_BOSS_LEVEL_DIFF] = sConfig.GetIntDefault("WorldBossLevelDiff",3); m_configs[CONFIG_WORLD_BOSS_LEVEL_DIFF] = sConfig.GetIntDefault("WorldBossLevelDiff",3);
// note: disable value (-1) will assigned as 0xFFFFFFF, to prevent overflow at calculations limit it to max possible player level (255) // note: disable value (-1) will assigned as 0xFFFFFFF, to prevent overflow at calculations limit it to max possible player level (100)
m_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.LowLevelHideDiff",4); m_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.LowLevelHideDiff", 4);
if(m_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] > 255) if(m_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] > 100)
m_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] = 255; m_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] = 100;
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.HighLevelHideDiff",7); m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.HighLevelHideDiff", 7);
if(m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > 255) if(m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > 100)
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = 255; m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = 100;
m_configs[CONFIG_DETECT_POS_COLLISION] = sConfig.GetBoolDefault("DetectPosCollision", true); m_configs[CONFIG_DETECT_POS_COLLISION] = sConfig.GetBoolDefault("DetectPosCollision", true);

View file

@ -415,7 +415,7 @@ LogColors = ""
# 2 - disable intro show in all cases # 2 - disable intro show in all cases
# #
# MaxPlayerLevel # MaxPlayerLevel
# Max level that can be reached by player for experience (in range from 1 to 255). # Max level that can be reached by player for experience (in range from 1 to 100).
# Change not recommended # Change not recommended
# Default: 70 # Default: 70
# #
@ -843,7 +843,7 @@ Channel.SilentlyGMJoin = 0
# 0 (not include) # 0 (not include)
# #
# GM.StartLevel # GM.StartLevel
# GM starting level (1-255) # GM starting level (1-100)
# Default: 1 # Default: 1
# #
################################################################################################################### ###################################################################################################################