diff --git a/include/game/opcode_table.hpp b/include/game/opcode_table.hpp index bc089018..66419810 100644 --- a/include/game/opcode_table.hpp +++ b/include/game/opcode_table.hpp @@ -187,6 +187,7 @@ enum class LogicalOpcode : uint16_t { SMSG_REMOVED_SPELL, SMSG_SEND_UNLEARN_SPELLS, SMSG_SPELL_DELAYED, + SMSG_CANCEL_AUTO_REPEAT, SMSG_AURA_UPDATE, SMSG_AURA_UPDATE_ALL, SMSG_SET_FLAT_SPELL_MODIFIER, diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 3f6c9e4a..0040b368 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -911,6 +911,8 @@ void GameHandler::handlePacket(network::Packet& packet) { case Opcode::SMSG_COOLDOWN_EVENT: handleCooldownEvent(packet); break; + case Opcode::SMSG_CANCEL_AUTO_REPEAT: + break; // Server signals to stop a repeating spell (wand/shoot); no client action needed case Opcode::SMSG_AURA_UPDATE: handleAuraUpdate(packet, false); break; @@ -8216,13 +8218,14 @@ void GameHandler::handleGossipMessage(network::Packet& packet) { // Query quest data and update quest log based on gossip quests for (const auto& questItem : currentGossip.quests) { - // Update quest log based on questIcon: - // questIcon & 0x04 = blue ? (turn-in/reward) - // questIcon & 0x02 = yellow ! (available) - // questIcon & 0x01 = gray ? (incomplete) - bool isCompletable = (questItem.questIcon & 0x04) != 0; // Can turn in - bool isIncomplete = (questItem.questIcon & 0x01) != 0; // Have but incomplete - // Note: questIcon & 0x02 = available (new quest), not added to log yet + // WotLK gossip questIcon is an integer enum, NOT a bitmask: + // 2 = yellow ! (available, not yet accepted) + // 4 = gray ? (active, objectives incomplete) + // 5 = gold ? (complete, ready to turn in) + // Bit-masking these values is wrong: 4 & 0x04 = true, treating incomplete + // quests as completable and causing the server to reject the turn-in request. + bool isCompletable = (questItem.questIcon == 5); // Gold ? = can turn in + bool isIncomplete = (questItem.questIcon == 4); // Gray ? = in progress // Add or update quest in log bool found = false; diff --git a/src/game/opcode_table.cpp b/src/game/opcode_table.cpp index b6b78446..32eb0577 100644 --- a/src/game/opcode_table.cpp +++ b/src/game/opcode_table.cpp @@ -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},