I’ve been trying to get this script working to clear the nameplate auras and whitelist my own, but I’ve been having a few problems. The script shows auras by name, and some abilities share the same name (Disable slow/root, Rake bleed/stun). If there’s anyone on the forums who can help, please let me know if there’s a way to add additional whitelisted auras by spell ID. I’ve spent ages trying to get this to work.
local whitelist = {
["Aura 1"] = "player";
["Aura 2"] = "pet";
["Aura 3"] = "all";
}
local function newShouldShowBuff(_,name,caster)
return name and caster and (whitelist[name] == caster or whitelist[name] == "all")
end
local function Mixin(baseFrame)
baseFrame.UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
end
local f = CreateFrame("Frame")
f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
f:SetScript("OnEvent", function(_,_,unitId)
Mixin(C_NamePlate.GetNamePlateForUnit(unitId))
end)
for _,baseFrame in pairs(C_NamePlate.GetNamePlates()) do
Mixin(baseFrame)
end