View Single Post
04-23-18, 02:28 AM   #5
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Code:
local function customFilter(element, _, _, name, _, _, _, _, _, _, _, _, _, spellID)
  element.bolster = element.bolster or 0

  if name and spellID == 209859 then
    element.bolster = element.bolster + 1

    if element.bolster > 1 then
      return true
    else
      return false
    end
  end

end

local function postUpdateAura(element, unit)
  local visibleBuffs = element.visibleBuffs
  local found
  for i = 1, visibleBuffs do
    local name, _, _, _, _, _, _, _, _, _, spellID = UnitAura(unit, i, "HELPFUL")
    if name and spellID == 209859 then
      element[i].count:SetText(element.bolster)
      found = true
    end
  end

  if not found then element.bolster = 0 end
end
  Reply With Quote