aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Unit
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Entities/Unit')
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index c25e4bf455b..6c310f594b9 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -15635,10 +15635,12 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
// only if not player and not controlled by player pet. And not at BG
if ((durabilityLoss && !player && !victim->ToPlayer()->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
{
- sLog->outStaticDebug("We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
- plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
+ float percent = sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH);
+ plrVictim->DurabilityLossAll(percent, false);
+ sLog->outStaticDebug("We are dead, losing %f percent durability", percent);
// durability lost message
- WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
+ WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 4);
+ data << uint32(percent*100);
plrVictim->GetSession()->SendPacket(&data);
}
// Call KilledUnit for creatures