diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index bbd7089d8a..e07a618bb8 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -546,7 +546,9 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo InitRunes(); - SetMoney(sWorld->getIntConfig(CONFIG_START_PLAYER_MONEY)); + SetMoney(GetClass() != CLASS_DEATH_KNIGHT + ? sWorld->getIntConfig(CONFIG_START_PLAYER_MONEY) + : sWorld->getIntConfig(CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY)); SetHonorPoints(sWorld->getIntConfig(CONFIG_START_HONOR_POINTS)); SetArenaPoints(sWorld->getIntConfig(CONFIG_START_ARENA_POINTS)); diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 3df010f102..1c95f1a9b4 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -928,6 +928,19 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_START_PLAYER_MONEY] = MAX_MONEY_AMOUNT; } + m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY] = sConfigMgr->GetIntDefault("StartDeathKnightPlayerMoney", 2000); + if (int32(m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY]) < 0) + { + TC_LOG_ERROR("server.loading", "StartDeathKnightPlayerMoney ({}) must be in range 0..{}. Set to {}.", m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY], MAX_MONEY_AMOUNT, 2000); + m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY] = 2000; + } + else if (m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY] > MAX_MONEY_AMOUNT) + { + TC_LOG_ERROR("server.loading", "StartDeathKnightPlayerMoney ({}) must be in range 0..{}. Set to {}.", + m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY], MAX_MONEY_AMOUNT, MAX_MONEY_AMOUNT); + m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY] = MAX_MONEY_AMOUNT; + } + m_int_configs[CONFIG_MAX_HONOR_POINTS] = sConfigMgr->GetIntDefault("MaxHonorPoints", 75000); if (int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]) < 0) { diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index c6a53d5e09..10ffd34029 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -241,6 +241,7 @@ enum WorldIntConfigs : uint32 CONFIG_START_PLAYER_LEVEL, CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL, CONFIG_START_PLAYER_MONEY, + CONFIG_START_DEATH_KNIGHT_PLAYER_MONEY, CONFIG_MAX_HONOR_POINTS, CONFIG_START_HONOR_POINTS, CONFIG_MAX_ARENA_POINTS, diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 3e2c7f1a76..d342770a53 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -845,6 +845,14 @@ StartDeathKnightPlayerLevel = 55 StartPlayerMoney = 0 +# +# StartDeathKnightPlayerMoney +# Description: Amount of money (in Copper) that a death knight character has after creation. +# Default: 2000 +# 100 - (1 Silver) + +StartDeathKnightPlayerMoney = 2000 + # # MaxHonorPoints # Description: Maximum honor points a character can have.