Originally Posted by Niketa
I added an extra check for printing the message to make sure the chat window is supposed to display those toast alerts first (I actually have a custom window I dedicate to whispers only and it was posting there before I did this).
|
Rather than creating all those new tables and looping over all the registered message types, just check if the event is registered on the frame:
Code:
if message and toonid then
for i = 1, NUM_CHAT_WINDOWS do
local f = _G["ChatFrame"..i]
if f:IsEventRegistered("CHAT_MSG_BN_INLINE_TOAST_ALERT") then
ChatFrame_MessageEventHandler(f, "CHAT_MSG_BN_INLINE_TOAST_ALERT", message, name, nil, 0, nil, nil, nil, nil, nil, nil, 0, nil, toonid)
end
end
end
Also, I'd move the
toonID check up with the
prev check... no sense proceeding to check for a message if there's no toonID.
As for the other problems, I'll see what I can come up with.