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 a1831e0c1e)

# Conflicts:
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Server/Packets/GameObjectPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp

Co-authored-by: MitchesD <majklprofik@seznam.cz>
This commit is contained in:
ForesterDev
2020-04-14 16:00:53 +04:00
committed by GitHub
parent 37ff15489b
commit e1a8ebc064
5 changed files with 20 additions and 7 deletions
+1 -2
View File
@@ -10949,8 +10949,7 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
TC_LOG_DEBUG("entities.unit", "We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
plrVictim->SendDirectMessage(&data);
plrVictim->SendDurabilityLoss();
}
// Call KilledUnit for creatures
if (attacker && attacker->GetTypeId() == TYPEID_UNIT && attacker->IsAIEnabled())