Did they change something about how the dropdown that shows up when you right click a player link in chat works? Before, if I changed the player name (the stuff inside |h |h), everything worked just fine. However, now (post 4.0) when I do this, I get the following results:
Because it for some reason thinks the player's name is "Laud (TestNote)", when I try to whisper or invite through this dropdown, it fails because the player doesn't exist.
1) Does anyone know if something changed about this behavior in the 4.0 patch?
2) Any way to avoid this problem? I basically copied Phanx's code from above.
I wrote a mod (ForumName2 on WoWI) a while back that pastes a custom note next to peoples' names in chat messages by running the code below in a hook of ChatFrame.AddMessage for each chat frame. In the post 4.0 UI code though, the code below doesn't do anything because "event" doesn't exist.
function ForumName2:AddMessage(frame, msg, ...)
if(event == "CHAT_MSG_SYSTEM") then
for i, info in pairs(systemMessageInfo) do
local output = self:SystemMessageHelper(msg, info, string_match(msg, info.pattern))
msg = output
local note = self:GetNote(arg2)
if note then
msg = string_gsub(msg, "|h(.*)" .. arg2 .. "(.*)|h", "|h%1" .. arg2 .. " (" .. note .. ")" .. "%2|h", 1)
self.hooks[frame]["AddMessage"](frame, msg, ...)
I tried changing this to use the chat message filter system, but the message you are passed in a chat filter does not contain the full formatting so I can't put the note next to the player's name as in the above code. I also tried just changing the name (which IS passed to you in the chat filter) but this causes issues with display in further messages.
So, I'm looking for a way to either a) get access to "event" in ChatFrame_AddMessage or b) accomplish the above using chat message filters. Any ideas?