Originally Posted by Phanx
Probably:
Code:
local orig = BNToastFrame_AddToast
function BNToastFrame_AddToast(toastType, toastData)
if toastType ~= 3 or toastData ~= "OQ" then
return orig(toastType, toastData)
end
end
On a side note, there's no need to attach Blizzard UI files to posts; you can just link to one of the several online mirrors of the code. Some even let you link directly to a specific line.
|
More just for convenience. I'd rather be able to bring the file up in Notepad++ with a click or two.
Lua Code:
local orig = BNToastFrame_AddToast
function BNToastFrame_AddToast(toastType, toastData)
if toastData ~= "OQ" then
return orig(toastType, toastData)
end
end
Think those conditionals would make more sense. Pass any 'BN_TOAST_TYPE_BROADCAST' that's not "OQ".
I'll give it a try.
Edit: Removed the check on toastType.
Edit 2: After doing a bit of testing, toastData would never be 'OQ' as a string. It would pass the friend id to be used with 'BNGetFriendInfoByID'.
Edit 3: More testing has revealed that the exact string has changed to '(OQ) ' which does include that space.
Lua Code:
local orig = BNToastFrame_AddToast
function BNToastFrame_AddToast(toastType, toastData)
if toastType == 3 then
local text = select(12,BNGetFriendInfoByID(toastData))
if text and text ~= "(OQ) " then -- Exact string, perhaps using string.find would be more appropriate.
orig(toastType, toastData)
end
else
orig(toastType, toastData)
end
end