View Single Post
02-07-14, 09:35 AM   #5
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Makes sense, final code:

Lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:SetScript("OnEvent", function()
  4.     f:UnregisterEvent("PLAYER_ENTERING_WORLD")
  5.     local orig = BNToastFrame_AddToast
  6.     function BNToastFrame_AddToast(toastType, toastData)
  7.         if toastType ~= 3 or select(12, BNGetFriendInfoByID(toastData)) ~= "(OQ) " then
  8.             return orig(toastType, toastData)
  9.         end
  10.     end
  11. end)

Alternatively if for some reason there is a deviation in the exact string this would fix the issue most likely:
Lua Code:
  1. if toastType ~= 3 or not strfind(strupper(select(12, BNGetFriendInfoByID(toastData))),"OQ") then

Last edited by suicidalkatt : 02-07-14 at 09:46 AM.
  Reply With Quote