Returns the event name and arguments of the CHAT_MSG_* event being fired,
read from the fire itself rather than the event/arg globals, which 1.12's
ChatFrame_OnEvent depends on and any earlier handler or hook can overwrite.
Nested chat events restore the outer payload when they return.
4.3.4's edit box renders |T...|t in its text. Typed markup stays literal
because the edit box stores a typed | as ||, and 1.12 does the same
(0x77c254; Paste goes through InsertChar too). So edit boxes need no
special case once || is read the way both engines read it.
- The span rule is 4.3.4's GxuDetermineQuotedCode CODE_TEXTURESTART
rule, in one scanner (IconSpanAt). Only |T...|t and |A...|a are spans;
|| is always a literal pipe. The old doubled ||T...||t match is gone.
Stock 1.12 has no pipe-doubling sanitizer, so the ||T it was built for
was typed text plus our own marker output.
- The edit-box suppression gates are removed: node bit 6 (really
non-space-wrap), the focused-buffer test, the render-line content
compare and the re-entry bracket.
- New co-hook on the fit-to-width function 0x772bc0 (mouse click to
cursor, single-line visible window), mirroring 4.3.4's
GxuFontGetMaxCharsWithinWidth.
- Ctrl+C drops icons: GxuStripControlCodes honours 4.3.4's 0x1000
texture bit, and CopySelection's mask is patched from 0x500 to 4.3.4's
0x1500. CopyToClipboard(text, true) now calls the same engine strip
instead of its own parser.
- {rt1} and the other raid tags are expanded in the CHAT_MSG text at the
event fire, and in the speech bubble after its escape strip (a
redirected SetText call at 0x4b16c0), as 4.3.4's
CGChatBubbleFrame::ParseRaidIcons does. The message buffer keeps the
tags.
- The chat anti-spoof doubles a smuggled |T's pipe, as the edit box does
for a typed one.
- The tokenizer hook honours the 0x800 all-pipes-literal gate.
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.