From 8ba5ca5337b5570ee75b9551277d7070cf3ca57c Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 14 Mar 2026 00:38:22 -0700 Subject: [PATCH] fix(combatlog): parse classic instakill log GUIDs as packed --- src/game/game_handler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index ff594ad6..f7937079 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -6384,15 +6384,15 @@ void GameHandler::handlePacket(network::Packet& packet) { } case Opcode::SMSG_SPELLINSTAKILLLOG: { // Sent when a unit is killed by a spell with SPELL_ATTR_EX2_INSTAKILL (e.g. Execute, Obliterate, etc.) - // WotLK: packed_guid caster + packed_guid victim + uint32 spellId - // TBC/Classic: full uint64 caster + full uint64 victim + uint32 spellId - const bool ikTbcLike = isClassicLikeExpansion() || isActiveExpansion("tbc"); + // WotLK/Classic/Turtle: packed_guid caster + packed_guid victim + uint32 spellId + // TBC: full uint64 caster + full uint64 victim + uint32 spellId + const bool ikUsesFullGuid = isActiveExpansion("tbc"); auto ik_rem = [&]() { return packet.getSize() - packet.getReadPos(); }; - if (ik_rem() < (ikTbcLike ? 8u : 1u)) { packet.setReadPos(packet.getSize()); break; } - uint64_t ikCaster = ikTbcLike + if (ik_rem() < (ikUsesFullGuid ? 8u : 1u)) { packet.setReadPos(packet.getSize()); break; } + uint64_t ikCaster = ikUsesFullGuid ? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet); - if (ik_rem() < (ikTbcLike ? 8u : 1u)) { packet.setReadPos(packet.getSize()); break; } - uint64_t ikVictim = ikTbcLike + if (ik_rem() < (ikUsesFullGuid ? 8u : 1u)) { packet.setReadPos(packet.getSize()); break; } + uint64_t ikVictim = ikUsesFullGuid ? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet); uint32_t ikSpell = (ik_rem() >= 4) ? packet.readUInt32() : 0; // Show kill/death feedback for the local player