aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorForesterDev <11771800+ForesterDev@users.noreply.github.com>2020-04-14 16:00:53 +0400
committerShauren <shauren.trinity@gmail.com>2022-01-01 15:25:11 +0100
commite73735fa61a9ba92653826acbd32d9bd9069fc2b (patch)
treee94d265e3bbf51b1e071d34f3ca8493e75193a30 /src
parentaeb250d597b2d9ceac78b35a15127a0c0fd7b026 (diff)
Core/PacketIO: updated SMSG_DURABILITY_DAMAGE_DEATH (#24442)
- use RATE_DURABILITY_LOSS_ON_DEATH for death from falling - add note, that RATE_DURABILITY_LOSS_ON_DEATH doesn't change log message (cherry picked from commit a1831e0c1e9329352732f01f4ae8a6b85a89a496) Co-authored-by: MitchesD <majklprofik@seznam.cz> (cherry picked from commit e1a8ebc064a2e30b4f1d0d129f034ff64368bedc)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index baf02061bd4..94367e1a6e4 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -692,11 +692,11 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{
if (type == DAMAGE_FALL) // DealDamage does not apply item durability loss from self-induced damage.
{
- TC_LOG_DEBUG("entities.player", "Player::EnvironmentalDamage: Player '%s' (%s) fall to death, loosing 10%% durability",
- GetName().c_str(), GetGUID().ToString().c_str());
- DurabilityLossAll(0.10f, false);
+ TC_LOG_DEBUG("entities.player", "Player::EnvironmentalDamage: Player '%s' (%s) fall to death, losing %f%% durability",
+ GetName().c_str(), GetGUID().ToString().c_str(), sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
+ DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
- SendDurabilityLoss(this, 10);
+ SendDurabilityLoss(this, uint32(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH) * 100.0f));
}
UpdateCriteria(CriteriaType::DieFromEnviromentalDamage, 1, type);