From 3bdd3f1d3f2522148060b58dbd5505cff042f436 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 13 Mar 2026 11:51:07 -0700 Subject: [PATCH] fix: pass actual GUIDs and spellId to SPELLDAMAGESHIELD and SPELLORDAMAGE_IMMUNE combat log These handlers already had casterGuid/victimGuid available but were discarding the packet spellId and not passing GUIDs to addCombatText. Now the combat log entries show the correct attacker/victim names and the spell that caused the reflect/immune event. --- 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 df5a0a7c..7bf9af67 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -6102,18 +6102,18 @@ void GameHandler::handlePacket(network::Packet& packet) { if (packet.getSize() - packet.getReadPos() < 12) { packet.setReadPos(packet.getSize()); break; } - /*uint32_t spellId =*/ packet.readUInt32(); - uint32_t damage = packet.readUInt32(); + uint32_t shieldSpellId = packet.readUInt32(); + uint32_t damage = packet.readUInt32(); if (!shieldClassicLike && packet.getSize() - packet.getReadPos() >= 4) /*uint32_t absorbed =*/ packet.readUInt32(); /*uint32_t school =*/ packet.readUInt32(); // Show combat text: damage shield reflect if (casterGuid == playerGuid) { // We have a damage shield that reflected damage - addCombatText(CombatTextEntry::SPELL_DAMAGE, static_cast(damage), 0, true); + addCombatText(CombatTextEntry::SPELL_DAMAGE, static_cast(damage), shieldSpellId, true, 0, casterGuid, victimGuid); } else if (victimGuid == playerGuid) { // A damage shield hit us (e.g. target's Thorns) - addCombatText(CombatTextEntry::SPELL_DAMAGE, static_cast(damage), 0, false); + addCombatText(CombatTextEntry::SPELL_DAMAGE, static_cast(damage), shieldSpellId, false, 0, casterGuid, victimGuid); } break; } @@ -6131,13 +6131,13 @@ void GameHandler::handlePacket(network::Packet& packet) { uint64_t victimGuid = immuneTbcLike ? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet); if (packet.getSize() - packet.getReadPos() < 5) break; - /*uint32_t spellId =*/ packet.readUInt32(); + uint32_t immuneSpellId = packet.readUInt32(); /*uint8_t saveType =*/ packet.readUInt8(); // Show IMMUNE text when the player is the caster (we hit an immune target) // or the victim (we are immune) if (casterGuid == playerGuid || victimGuid == playerGuid) { - addCombatText(CombatTextEntry::IMMUNE, 0, 0, - casterGuid == playerGuid); + addCombatText(CombatTextEntry::IMMUNE, 0, immuneSpellId, + casterGuid == playerGuid, 0, casterGuid, victimGuid); } break; }