mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
game: fix Classic parseQuestDetails missing emote section before reward items
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
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.
This commit is contained in:
parent
16cdde82b3
commit
29ca9809b1
1 changed files with 10 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue