mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
Fix NPC chat showing only name without message text
Two bugs in SMSG_MESSAGECHAT parser for MONSTER_SAY/YELL/EMOTE: 1. Sender name included trailing null byte from server (nameLen includes null terminator). The embedded null in std::string caused ImGui to truncate the concatenated display string at the NPC name, hiding " says: <message>" entirely. 2. Missing NamedGuid receiver name for non-player/non-pet targets. When the receiver GUID is a creature, the server writes an additional SizedCString (target name) that we weren't reading, shifting all subsequent field reads. Also adds MONSTER_WHISPER, MONSTER_PARTY, RAID_BOSS_EMOTE, RAID_BOSS_WHISPER chat types with proper parsing and display formatting (says/yells/whispers).
This commit is contained in:
parent
f1caf8c03e
commit
b948720ec3
4 changed files with 41 additions and 6 deletions
|
|
@ -5967,7 +5967,8 @@ void GameHandler::handleMessageChat(network::Packet& packet) {
|
|||
// Trigger chat bubble for SAY/YELL messages from others
|
||||
if (chatBubbleCallback_ && data.senderGuid != 0) {
|
||||
if (data.type == ChatType::SAY || data.type == ChatType::YELL ||
|
||||
data.type == ChatType::MONSTER_SAY || data.type == ChatType::MONSTER_YELL) {
|
||||
data.type == ChatType::MONSTER_SAY || data.type == ChatType::MONSTER_YELL ||
|
||||
data.type == ChatType::MONSTER_PARTY) {
|
||||
bool isYell = (data.type == ChatType::YELL || data.type == ChatType::MONSTER_YELL);
|
||||
chatBubbleCallback_(data.senderGuid, data.message, isYell);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue