Fix quest turn-in loop and register SMSG_CANCEL_AUTO_REPEAT

The gossip questIcon field is an integer enum (2=available, 4=incomplete,
5=ready-to-turn-in), not a bitmask. Using (questIcon & 0x04) caused icon=4
(in-progress quests) to be treated as completable, so the client sent
CMSG_QUESTGIVER_REQUEST_REWARD for incomplete quests. The server rejected
these silently and re-sent SMSG_GOSSIP_MESSAGE, causing an infinite loop.

Fix: use exact equality (questIcon == 5 for completable, == 4 for incomplete).

Also register SMSG_CANCEL_AUTO_REPEAT (0x06B) to suppress the unhandled
opcode warning logged on every login.
This commit is contained in:
Kelsi 2026-02-17 15:57:51 -08:00
parent 55fd692c1a
commit ca3cf209d9
3 changed files with 13 additions and 7 deletions

View file

@ -152,6 +152,7 @@ static const OpcodeNameEntry kOpcodeNames[] = {
{"SMSG_REMOVED_SPELL", LogicalOpcode::SMSG_REMOVED_SPELL},
{"SMSG_SEND_UNLEARN_SPELLS", LogicalOpcode::SMSG_SEND_UNLEARN_SPELLS},
{"SMSG_SPELL_DELAYED", LogicalOpcode::SMSG_SPELL_DELAYED},
{"SMSG_CANCEL_AUTO_REPEAT", LogicalOpcode::SMSG_CANCEL_AUTO_REPEAT},
{"SMSG_AURA_UPDATE", LogicalOpcode::SMSG_AURA_UPDATE},
{"SMSG_AURA_UPDATE_ALL", LogicalOpcode::SMSG_AURA_UPDATE_ALL},
{"SMSG_SET_FLAT_SPELL_MODIFIER", LogicalOpcode::SMSG_SET_FLAT_SPELL_MODIFIER},
@ -491,6 +492,7 @@ void OpcodeTable::loadWotlkDefaults() {
{LogicalOpcode::SMSG_REMOVED_SPELL, 0x203},
{LogicalOpcode::SMSG_SEND_UNLEARN_SPELLS, 0x41F},
{LogicalOpcode::SMSG_SPELL_DELAYED, 0x1E2},
{LogicalOpcode::SMSG_CANCEL_AUTO_REPEAT, 0x06B},
{LogicalOpcode::SMSG_AURA_UPDATE, 0x3FA},
{LogicalOpcode::SMSG_AURA_UPDATE_ALL, 0x495},
{LogicalOpcode::SMSG_SET_FLAT_SPELL_MODIFIER, 0x266},