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

@ -6570,7 +6570,9 @@ void GameHandler::handleInitialSpells(network::Packet& packet) {
void GameHandler::handleCastFailed(network::Packet& packet) {
CastFailedData data;
if (!CastFailedParser::parse(packet, data)) return;
bool ok = packetParsers_ ? packetParsers_->parseCastFailed(packet, data)
: CastFailedParser::parse(packet, data);
if (!ok) return;
casting = false;
currentCastSpellId = 0;