mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Correctly select GM level in case heroic class.
Signed-off-by: bloutix <bloutix@getmangos.com> Move heroic class starting level to mangos.conf Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c798318b7b
commit
f5c4fe86e8
4 changed files with 30 additions and 7 deletions
|
|
@ -599,16 +599,19 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
|
||||||
}
|
}
|
||||||
|
|
||||||
// set starting level
|
// set starting level
|
||||||
|
uint32 start_level = getClass() != CLASS_DEATH_KNIGHT
|
||||||
|
? sWorld.getConfig(CONFIG_START_PLAYER_LEVEL)
|
||||||
|
: sWorld.getConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
|
||||||
|
|
||||||
if (GetSession()->GetSecurity() >= SEC_MODERATOR)
|
if (GetSession()->GetSecurity() >= SEC_MODERATOR)
|
||||||
SetUInt32Value(UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_GM_LEVEL));
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if(getClass() == CLASS_DEATH_KNIGHT)
|
uint32 gm_level = sWorld.getConfig(CONFIG_START_GM_LEVEL);
|
||||||
SetUInt32Value(UNIT_FIELD_LEVEL, 55);
|
if(gm_level > start_level)
|
||||||
else
|
start_level = gm_level;
|
||||||
SetUInt32Value(UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetUInt32Value(UNIT_FIELD_LEVEL, start_level);
|
||||||
|
|
||||||
InitRunes();
|
InitRunes();
|
||||||
|
|
||||||
SetUInt32Value (PLAYER_FIELD_COINAGE, sWorld.getConfig(CONFIG_START_PLAYER_MONEY));
|
SetUInt32Value (PLAYER_FIELD_COINAGE, sWorld.getConfig(CONFIG_START_PLAYER_MONEY));
|
||||||
|
|
|
||||||
|
|
@ -675,6 +675,20 @@ void World::LoadConfigSettings(bool reload)
|
||||||
m_configs[CONFIG_START_PLAYER_LEVEL] = m_configs[CONFIG_MAX_PLAYER_LEVEL];
|
m_configs[CONFIG_START_PLAYER_LEVEL] = m_configs[CONFIG_MAX_PLAYER_LEVEL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = sConfig.GetIntDefault("StartHeroicPlayerLevel", 55);
|
||||||
|
if(m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] < 1)
|
||||||
|
{
|
||||||
|
sLog.outError("StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.",
|
||||||
|
m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL],m_configs[CONFIG_MAX_PLAYER_LEVEL]);
|
||||||
|
m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = 55;
|
||||||
|
}
|
||||||
|
else if(m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] > m_configs[CONFIG_MAX_PLAYER_LEVEL])
|
||||||
|
{
|
||||||
|
sLog.outError("StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",
|
||||||
|
m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL],m_configs[CONFIG_MAX_PLAYER_LEVEL],m_configs[CONFIG_MAX_PLAYER_LEVEL]);
|
||||||
|
m_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = m_configs[CONFIG_MAX_PLAYER_LEVEL];
|
||||||
|
}
|
||||||
|
|
||||||
m_configs[CONFIG_START_PLAYER_MONEY] = sConfig.GetIntDefault("StartPlayerMoney", 0);
|
m_configs[CONFIG_START_PLAYER_MONEY] = sConfig.GetIntDefault("StartPlayerMoney", 0);
|
||||||
if(m_configs[CONFIG_START_PLAYER_MONEY] < 0)
|
if(m_configs[CONFIG_START_PLAYER_MONEY] < 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ enum WorldConfigs
|
||||||
CONFIG_SKIP_CINEMATICS,
|
CONFIG_SKIP_CINEMATICS,
|
||||||
CONFIG_MAX_PLAYER_LEVEL,
|
CONFIG_MAX_PLAYER_LEVEL,
|
||||||
CONFIG_START_PLAYER_LEVEL,
|
CONFIG_START_PLAYER_LEVEL,
|
||||||
|
CONFIG_START_HEROIC_PLAYER_LEVEL,
|
||||||
CONFIG_START_PLAYER_MONEY,
|
CONFIG_START_PLAYER_MONEY,
|
||||||
CONFIG_MAX_HONOR_POINTS,
|
CONFIG_MAX_HONOR_POINTS,
|
||||||
CONFIG_START_HONOR_POINTS,
|
CONFIG_START_HONOR_POINTS,
|
||||||
|
|
|
||||||
|
|
@ -417,12 +417,16 @@ LogColors = ""
|
||||||
# MaxPlayerLevel
|
# MaxPlayerLevel
|
||||||
# Max level that can be reached by player for experience (in range from 1 to 100).
|
# 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: 80
|
||||||
#
|
#
|
||||||
# StartPlayerLevel
|
# StartPlayerLevel
|
||||||
# Staring level that have character at creating (in range 1 to MaxPlayerLevel)
|
# Staring level that have character at creating (in range 1 to MaxPlayerLevel)
|
||||||
# Default: 1
|
# Default: 1
|
||||||
#
|
#
|
||||||
|
# StartHeroicPlayerLevel
|
||||||
|
# Staring level that have character of heroic class at creating (in range 1 to MaxPlayerLevel)
|
||||||
|
# Default: 55
|
||||||
|
#
|
||||||
# StartPlayerMoney
|
# StartPlayerMoney
|
||||||
# Amount of money that new players will start with.
|
# Amount of money that new players will start with.
|
||||||
# If you want to start with silver, use for example 100 (100 copper = 1 silver)
|
# If you want to start with silver, use for example 100 (100 copper = 1 silver)
|
||||||
|
|
@ -573,6 +577,7 @@ CharactersPerRealm = 10
|
||||||
SkipCinematics = 0
|
SkipCinematics = 0
|
||||||
MaxPlayerLevel = 80
|
MaxPlayerLevel = 80
|
||||||
StartPlayerLevel = 1
|
StartPlayerLevel = 1
|
||||||
|
StartHeroicPlayerLevel = 55
|
||||||
StartPlayerMoney = 0
|
StartPlayerMoney = 0
|
||||||
MaxHonorPoints = 75000
|
MaxHonorPoints = 75000
|
||||||
StartHonorPoints = 0
|
StartHonorPoints = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue