mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
4.3.4's SendChatEvent fires every chat event with lineID and the sender's GUID string after the ten arguments 1.12 already passes. 1.12 fires all ten from one FUN_FIRE_EVENT call in FUN_0049B0B0, so that call is redirected to append them: - arg11 lineID: ++counter per message, before its event fires; 0 for text emotes, as 4.3.4's AddTextEmoteMessage passes. - arg12 guid: the sender's GUID only for a player sender and a message not tagged GM, "" otherwise. The redirect also works under Turtle's .tdata detour on the same function, which returns to the PUSH just before the CALL. GetCurrentChatGUID() stays and now reads the same sender, nil where arg12 is "". It moves into the new Chat::EventArgs module with the redirect. The sender GUID was wrong or missing on several paths, all fixed here: - Monster say/yell put the monster's TARGET (often the local player) in the pair we published; the packet layout (vmangos BuildChatPacket, matching FUN_0049D560's reads) sends sender, name, target. Monster chat now has no sender, as in 4.3.4. - Raid boss whispers are rewritten to a plain whisper carrying the target, so they reported the local player as sender. An SMSG_MESSAGECHAT subscriber keeps the wire type for the dispatch that follows. - A message from a sender the name cache did not know was queued and later dispatched with both GUID pairs zeroed, by the name-query callback FUN_0049CCC0 or the enter-world drain FUN_0049D230. The queue entry keeps the GUID, and both callers pass pointers into it. - Text emotes fire without passing their GUID on; the builder is co-hooked to provide it. Chat::Dispatch's argument labels are corrected too: the pair it called the target GUID is the speaker the speech bubble is placed on.