View Single Post
03-24-22, 11:27 PM   #15
Zaqqari
A Deviate Faerie Dragon
Join Date: Aug 2019
Posts: 11
This addon has stopped working recently. It shows no auras on nameplates. BugGrabber is not getting anything.

Lua Code:
  1. local whitelist = {
  2.     [SpellID] = "player",--Aura Name
  3.     [SpellID] = "pet",--Aura Name
  4.     [SpellID] = "all",--Aura Name
  5.    
  6. }
  7.  
  8. local function newShouldShowBuff(self, name, caster, nameplateShowPersonal, nameplateShowAll, duration)
  9.     if not name then return false end
  10.     local filter = "INCLUDE_NAME_PLATE_ONLY"
  11.     if UnitIsUnit(self.unit, "player") then
  12.         filter = "HELPFUL|"..filter
  13.     elseif UnitIsFriend(self.unit, "player") then
  14.         return true
  15.     else
  16.         filter = "HARMFUL|"..filter
  17.     end
  18.     for i=1, BUFF_MAX_DISPLAY do
  19.         local spellName, _, _, _, spellDuration, _, spellCaster, _, _, spellId = UnitAura(self.unit, i, filter);
  20.         if not spellName then break end
  21.         if name == spellName and caster == spellCaster and duration == spellDuration then
  22.             if (caster and whitelist[spellId] == spellCaster) or whitelist[spellId] == "all" then
  23.                 return true
  24.             end
  25.         end
  26.     end
  27.     return false
  28. end
  29. local f = CreateFrame("Frame")
  30. f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
  31. f:SetScript("OnEvent", function(_,_,unitId)
  32.     C_NamePlate.GetNamePlateForUnit(unitId).UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
  33. end)
  34. for _,baseFrame in pairs(C_NamePlate.GetNamePlates()) do
  35.     baseFrame.UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
  36. end

I think this could have something to do with it(?):
https://us.forums.blizzard.com/en/wo...ations/1205007

Last edited by Zaqqari : 03-25-22 at 01:00 AM.
  Reply With Quote