mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: surface absorb/resist from SMSG_ENVIRONMENTALDAMAGELOG
Environmental damage (drowning, lava, fire) also carries absorb/resist fields. Show these as ABSORB/RESIST combat text so players see the full picture of incoming environmental hits, consistent with spell/melee.
This commit is contained in:
parent
031448ec6d
commit
f50cb04887
1 changed files with 9 additions and 4 deletions
|
|
@ -2450,10 +2450,15 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
uint64_t victimGuid = packet.readUInt64();
|
||||
/*uint8_t envType =*/ packet.readUInt8();
|
||||
uint32_t damage = packet.readUInt32();
|
||||
/*uint32_t absorb =*/ packet.readUInt32();
|
||||
/*uint32_t resist =*/ packet.readUInt32();
|
||||
if (victimGuid == playerGuid && damage > 0) {
|
||||
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(damage), 0, false);
|
||||
uint32_t absorb = packet.readUInt32();
|
||||
uint32_t resist = packet.readUInt32();
|
||||
if (victimGuid == playerGuid) {
|
||||
if (damage > 0)
|
||||
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(damage), 0, false);
|
||||
if (absorb > 0)
|
||||
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(absorb), 0, false);
|
||||
if (resist > 0)
|
||||
addCombatText(CombatTextEntry::RESIST, static_cast<int32_t>(resist), 0, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue