mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-05 08:43:50 +00:00
tbc: fix heal log GUID parsing and route combat through virtual dispatch
Add TbcPacketParsers::parseSpellHealLog override using full uint64 GUIDs (TBC) instead of packed GUIDs (WotLK). Route handleAttackerStateUpdate, handleSpellDamageLog, and handleSpellHealLog through the virtual packetParsers_ interface so expansion-specific overrides are actually called. Previously the game handler bypassed virtual dispatch with direct static parser calls, making all three TBC overrides dead code.
This commit is contained in:
parent
b4f744d000
commit
63d8200303
3 changed files with 34 additions and 3 deletions
|
|
@ -1047,5 +1047,29 @@ bool TbcPacketParsers::parseSpellDamageLog(network::Packet& packet, SpellDamageL
|
|||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// TbcPacketParsers::parseSpellHealLog — TBC 2.4.3 SMSG_SPELLHEALLOG
|
||||
//
|
||||
// TBC uses full uint64 GUIDs; WotLK uses packed GUIDs.
|
||||
// ============================================================================
|
||||
bool TbcPacketParsers::parseSpellHealLog(network::Packet& packet, SpellHealLogData& data) {
|
||||
if (packet.getSize() - packet.getReadPos() < 25) return false;
|
||||
|
||||
data.targetGuid = packet.readUInt64(); // full GUID in TBC
|
||||
data.casterGuid = packet.readUInt64(); // full GUID in TBC
|
||||
data.spellId = packet.readUInt32();
|
||||
data.heal = packet.readUInt32();
|
||||
data.overheal = packet.readUInt32();
|
||||
// TBC has no absorbed field in SMSG_SPELLHEALLOG; skip crit flag
|
||||
if (packet.getReadPos() < packet.getSize()) {
|
||||
uint8_t critFlag = packet.readUInt8();
|
||||
data.isCrit = (critFlag != 0);
|
||||
}
|
||||
|
||||
LOG_INFO("[TBC] Spell heal: spellId=", data.spellId, " heal=", data.heal,
|
||||
data.isCrit ? " CRIT" : "");
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace game
|
||||
} // namespace wowee
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue