mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
d22d32838f
commit
139a2f39fe
3 changed files with 27 additions and 14 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue