Fix Classic/Turtle spell casting, cast fail parsing, and empty chat

Three Classic packet format fixes:

1. CMSG_CAST_SPELL: target flags are uint32 (not uint16). The wrong
   size caused the server to misparse the packet as an item enchant
   operation, returning "item already enchanted".

2. SMSG_CAST_FAILED: Classic has no castCount byte prefix (added in
   TBC). Added parseCastFailed override to ClassicPacketParsers.
   Without this, the parser read the wrong bytes and produced
   "Spell cast failed (error 0)" for every failure.

3. SMSG_MESSAGECHAT: Removed spurious receiverGuid read for SAY/YELL
   types. Classic chat format has no second GUID before the message
   body — the extra 8-byte read consumed messageLen + message data,
   producing empty chat messages.
This commit is contained in:
Kelsi 2026-02-14 16:54:43 -08:00
parent d22d32838f
commit 139a2f39fe
3 changed files with 27 additions and 14 deletions

View file

@ -95,6 +95,11 @@ public:
return InitialSpellsParser::parse(packet, data);
}
/** Parse SMSG_CAST_FAILED */
virtual bool parseCastFailed(network::Packet& packet, CastFailedData& data) {
return CastFailedParser::parse(packet, data);
}
/** Parse SMSG_AURA_UPDATE / SMSG_AURA_UPDATE_ALL */
virtual bool parseAuraUpdate(network::Packet& packet, AuraUpdateData& data, bool isAll = false) {
return AuraUpdateParser::parse(packet, data, isAll);
@ -207,6 +212,7 @@ public:
const MovementInfo& info,
uint64_t playerGuid = 0) override;
network::Packet buildCastSpell(uint32_t spellId, uint64_t targetGuid, uint8_t castCount) override;
bool parseCastFailed(network::Packet& packet, CastFailedData& data) override;
bool parseMessageChat(network::Packet& packet, MessageChatData& data) override;
bool parseGuildRoster(network::Packet& packet, GuildRosterData& data) override;
bool parseGuildQueryResponse(network::Packet& packet, GuildQueryResponseData& data) override;