mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix SMSG_MESSAGECHAT parser missing receiverGuid for most chat types
The parser was not reading the uint64 receiverGuid that WoW 3.3.5 sends for SAY/GUILD/PARTY/YELL/WHISPER/RAID/etc types, causing all incoming chat from other players to misparse (blank messages, wrong type displayed). Also fix TEXT_EMOTE display to not prepend "You " for incoming emotes from other players, and fix CHANNEL/ACHIEVEMENT types to read the correct receiverGuid field.
This commit is contained in:
parent
9bcead6a0f
commit
be425c94dc
2 changed files with 12 additions and 13 deletions
|
|
@ -1184,6 +1184,8 @@ bool MessageChatParser::parse(network::Packet& packet, MessageChatData& data) {
|
|||
packet.readUInt32();
|
||||
|
||||
// Type-specific data
|
||||
// WoW 3.3.5 SMSG_MESSAGECHAT format: after senderGuid+unk, most types
|
||||
// have a receiverGuid (uint64). Some types have extra fields before it.
|
||||
switch (data.type) {
|
||||
case ChatType::MONSTER_SAY:
|
||||
case ChatType::MONSTER_YELL:
|
||||
|
|
@ -1196,33 +1198,29 @@ bool MessageChatParser::parse(network::Packet& packet, MessageChatData& data) {
|
|||
data.senderName[i] = static_cast<char>(packet.readUInt8());
|
||||
}
|
||||
}
|
||||
|
||||
// Read receiver GUID (usually 0 for monsters)
|
||||
// Read receiver GUID
|
||||
data.receiverGuid = packet.readUInt64();
|
||||
break;
|
||||
}
|
||||
|
||||
case ChatType::WHISPER_INFORM: {
|
||||
// Read receiver name
|
||||
data.receiverName = packet.readString();
|
||||
break;
|
||||
}
|
||||
|
||||
case ChatType::CHANNEL: {
|
||||
// Read channel name
|
||||
// Read channel name, then receiver GUID
|
||||
data.channelName = packet.readString();
|
||||
data.receiverGuid = packet.readUInt64();
|
||||
break;
|
||||
}
|
||||
|
||||
case ChatType::ACHIEVEMENT:
|
||||
case ChatType::GUILD_ACHIEVEMENT: {
|
||||
// Read achievement ID
|
||||
packet.readUInt32();
|
||||
// Read target GUID
|
||||
data.receiverGuid = packet.readUInt64();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// No additional data for most types
|
||||
// SAY, GUILD, PARTY, YELL, WHISPER, WHISPER_INFORM, RAID, etc.
|
||||
// All have receiverGuid (typically senderGuid repeated)
|
||||
data.receiverGuid = packet.readUInt64();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue