fix(Core/Player): Give Death Knight's twenty silver on character creation (#12974)

* Make sacrifices to workflow god
Best note ever ^^
This commit is contained in:
Benjamin Jackson
2022-09-21 07:32:33 -04:00
committed by GitHub
parent fd08f6150f
commit 6a357da28c
4 changed files with 19 additions and 1 deletions

View File

@@ -868,6 +868,14 @@ StartHeroicPlayerLevel = 55
StartPlayerMoney = 0
#
# StartHeroicPlayerMoney
# Description: Amount of money (in Copper) that heroic class characters have after creation.
# Default: 2000
# 2000 - (20 Silver)
StartHeroicPlayerMoney = 2000
#
# MaxHonorPoints
# Description: Maximum honor points a character can have.

View File

@@ -569,7 +569,9 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
InitRunes();
SetUInt32Value(PLAYER_FIELD_COINAGE, sWorld->getIntConfig(CONFIG_START_PLAYER_MONEY));
SetUInt32Value(PLAYER_FIELD_COINAGE, getClass() != CLASS_DEATH_KNIGHT
? sWorld->getIntConfig(CONFIG_START_PLAYER_MONEY)
: sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_MONEY));
SetHonorPoints(sWorld->getIntConfig(CONFIG_START_HONOR_POINTS));
SetArenaPoints(sWorld->getIntConfig(CONFIG_START_ARENA_POINTS));

View File

@@ -231,6 +231,7 @@ enum WorldIntConfigs
CONFIG_START_PLAYER_LEVEL,
CONFIG_START_HEROIC_PLAYER_LEVEL,
CONFIG_START_PLAYER_MONEY,
CONFIG_START_HEROIC_PLAYER_MONEY,
CONFIG_MAX_HONOR_POINTS,
CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT,
CONFIG_START_HONOR_POINTS,

View File

@@ -848,6 +848,13 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0;
}
m_int_configs[CONFIG_START_HEROIC_PLAYER_MONEY] = sConfigMgr->GetOption<int32>("StartHeroicPlayerMoney", 2000);
if (int32(m_int_configs[CONFIG_START_HEROIC_PLAYER_MONEY]) < 0 || int32(m_int_configs[CONFIG_START_HEROIC_PLAYER_MONEY]) > MAX_MONEY_AMOUNT)
{
LOG_ERROR("server.loading", "StartHeroicPlayerMoney ({}) must be in range 0..{}. Set to {}.", m_int_configs[CONFIG_START_HEROIC_PLAYER_MONEY], MAX_MONEY_AMOUNT, 2000);
m_int_configs[CONFIG_START_HEROIC_PLAYER_MONEY] = 2000;
}
m_int_configs[CONFIG_MAX_HONOR_POINTS] = sConfigMgr->GetOption<int32>("MaxHonorPoints", 75000);
if (int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]) < 0)
{