Quantcast
WoWInterface - View Single Post - Filter on nameplates debuffs.
View Single Post
02-01-21, 08:48 AM   #5
Sylen
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 50
I use this. It hides all debuffs and just shows the debuffs you add into the whitelist.

Lua Code:
  1. --Filter Buffs and Debuffs on Nameplates (including Personal Resource Display)
  2.  
  3. local whitelist = {
  4.     --Priest Debuffs
  5.     ["Shadow Word: Pain"] = "player",
  6.     ["Mind Soothe"] = "all",
  7. }
  8.  
  9. --This function is for name filtering
  10. local function newShouldShowBuff(_,name,caster)
  11.     return name and caster and (whitelist[name] == caster or whitelist[name] == "all")
  12. end
  13.  
  14. local function Mixin(baseFrame)
  15.     baseFrame.UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
  16. end
  17.  
  18. local f = CreateFrame("Frame")
  19.     f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
  20.     f:SetScript("OnEvent", function(_,_,unitId)
  21.    
  22.     Mixin(C_NamePlate.GetNamePlateForUnit(unitId))
  23. end)
  24.  
  25. for _,baseFrame in pairs(C_NamePlate.GetNamePlates()) do
  26.     Mixin(baseFrame)
  27. end
  Reply With Quote