From c1f636481474b76f0a98efa559885efdfc5e30d5 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 29 Mar 2026 20:05:45 -0700 Subject: [PATCH] =?UTF-8?q?cleanup:=20remove=20misleading=20(void)flags=20?= =?UTF-8?q?=E2=80=94=20variable=20IS=20used=20for=20crit=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cast falsely suggests flags is unused but it's read on the next line for isCrit = (flags & 0x02). Also inlines the periodicLog discard. --- src/game/world_packets.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/game/world_packets.cpp b/src/game/world_packets.cpp index 7297298d..f57671f9 100644 --- a/src/game/world_packets.cpp +++ b/src/game/world_packets.cpp @@ -3533,13 +3533,10 @@ bool SpellDamageLogParser::parse(network::Packet& packet, SpellDamageLogData& da return false; } - uint8_t periodicLog = packet.readUInt8(); - (void)periodicLog; + (void)packet.readUInt8(); // periodicLog (not displayed) packet.readUInt8(); // unused packet.readUInt32(); // blocked - uint32_t flags = packet.readUInt32(); - (void)flags; - // Check crit flag + uint32_t flags = packet.readUInt32(); // flags IS used — bit 0x02 = crit data.isCrit = (flags & 0x02) != 0; LOG_DEBUG("Spell damage: spellId=", data.spellId, " dmg=", data.damage,