Skip to content

Commit

Permalink
Merge TrinityCore 3.3.5 to ElunaTrinityWotlk [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Nov 30, 2024
2 parents caad986 + 65e2474 commit 56d7f14
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
13 changes: 13 additions & 0 deletions src/server/game/World/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions src/server/game/World/World.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 8 additions & 0 deletions src/server/worldserver/worldserver.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 56d7f14

Please sign in to comment.