mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Fix SMSG_ENVIRONMENTAL_DAMAGE_LOG to use uint64 GUID (not packed)
WotLK 3.3.5a sends a raw uint64 victim GUID in this packet, not a packed GUID. Update the handler format to match (uint64 + uint8 type + uint32 damage + uint32 absorb). Remove the now-dead SMSG_ENVIRONMENTALDAMAGELOG handler since the opcode alias always routes to SMSG_ENVIRONMENTAL_DAMAGE_LOG.
This commit is contained in:
parent
70dcb6ef43
commit
f43277dc28
1 changed files with 5 additions and 6 deletions
|
|
@ -3086,13 +3086,12 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
break;
|
||||
}
|
||||
case Opcode::SMSG_ENVIRONMENTAL_DAMAGE_LOG: {
|
||||
// packed_guid victim + uint32 envDmgType + uint32 damage + uint32 absorbed + uint32 resisted
|
||||
// uint64 victimGuid + uint8 envDmgType + uint32 damage + uint32 absorbed + uint32 resisted
|
||||
// envDmgType: 1=Exhausted(fatigue), 2=Drowning, 3=Fall, 4=Lava, 5=Slime, 6=Fire
|
||||
if (packet.getSize() - packet.getReadPos() < 2) { packet.setReadPos(packet.getSize()); break; }
|
||||
uint64_t victimGuid = UpdateObjectParser::readPackedGuid(packet);
|
||||
if (packet.getSize() - packet.getReadPos() < 12) { packet.setReadPos(packet.getSize()); break; }
|
||||
/*uint32_t envType =*/ packet.readUInt32();
|
||||
uint32_t dmg = packet.readUInt32();
|
||||
if (packet.getSize() - packet.getReadPos() < 21) { packet.setReadPos(packet.getSize()); break; }
|
||||
uint64_t victimGuid = packet.readUInt64();
|
||||
/*uint8_t envType =*/ packet.readUInt8();
|
||||
uint32_t dmg = packet.readUInt32();
|
||||
/*uint32_t abs =*/ packet.readUInt32();
|
||||
if (victimGuid == playerGuid && dmg > 0)
|
||||
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(dmg), 0, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue