Skip to content

Commit

Permalink
Merge 3.3.5-base_patch to 3.3.5-passive_anticheat
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Dec 2, 2024
2 parents 92d9050 + 772e291 commit 4ada242
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/common/Collision/Models/ModelInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ namespace VMAP
if (info.hitModel->GetLiquidLevel(pModel, zDist))
{
// calculate world height (zDist in model coords):
// assume WMO not tilted (wouldn't make much sense anyway)
liqHeight = zDist * iScale + iPos.z;
liqHeight = (Vector3(pModel.x, pModel.y, zDist) * iInvRot * iScale + iPos).z;
return true;
}
return false;
Expand Down
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 @@ -557,7 +557,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 @@ -918,6 +918,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 @@ -277,6 +277,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 4ada242

Please sign in to comment.