What I currently do is add a new attribute in 'updateAura'.
Code:
button.spellID = aura.spellId
Lua Code:
local BOLSTER_ID = 209859
local function PreUpdate(element)
element.numBolster = 0
end
local function FilterAura(element, _, data)
if data.name and data.spellId == BOLSTER_ID then
element.numBolster = element.numBolster + 1
return element.numBolster == 1
end
end
local function PostUpdate(element)
if element.numBolster == 0 then return end
for i = 1, #element.sortedBuffs do
local button = element[i]
if button.spellID == BOLSTER_ID then
button.Count:SetText(element.numBolster)
break
end
end
end