From 29ca9809b1c7bc45a92f65a00a7406a6a8d2cb0a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 03:09:12 -0700 Subject: [PATCH] game: fix Classic parseQuestDetails missing emote section before reward items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vanilla 1.12 SMSG_QUESTGIVER_QUEST_DETAILS includes an emote section between suggestedPlayers and the choice/reward item lists: activateAccept(u8) + suggestedPlayers(u32) + emoteCount(u32) + [delay(u32) + type(u32)] × emoteCount + choiceCount(u32) + choices + rewardCount(u32) + rewards + money(u32) The parser was skipping the emote section, causing the emote count to be misread as the choice item count. Quests with emotes would show zero choice items and shifted/missing reward and money data. --- src/game/packet_parsers_classic.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/packet_parsers_classic.cpp b/src/game/packet_parsers_classic.cpp index 6a264874..c0ab0c88 100644 --- a/src/game/packet_parsers_classic.cpp +++ b/src/game/packet_parsers_classic.cpp @@ -1584,6 +1584,16 @@ bool ClassicPacketParsers::parseQuestDetails(network::Packet& packet, QuestDetai /*activateAccept*/ packet.readUInt8(); data.suggestedPlayers = packet.readUInt32(); + // Vanilla 1.12: emote section before reward items + // Format: emoteCount(u32) + [delay(u32) + type(u32)] × emoteCount + if (packet.getReadPos() + 4 <= packet.getSize()) { + uint32_t emoteCount = packet.readUInt32(); + for (uint32_t i = 0; i < emoteCount && packet.getReadPos() + 8 <= packet.getSize(); ++i) { + packet.readUInt32(); // delay + packet.readUInt32(); // type + } + } + // Choice reward items: variable count + 3 uint32s each if (packet.getReadPos() + 4 <= packet.getSize()) { uint32_t choiceCount = packet.readUInt32();