/
return true |
end |
end |
local sort = function(a, b) |
local compa, compb = a.noTime and math.huge or a.expirationTime, b.noTime and math.huge or b.expirationTime |
return compa > compb |
end |
--[[ |
Main update function, gathers the buffs/debuffs base on a filter. Then for each buff/debuff a status bar is shown |
monitoring it's remaining time. |
]]-- |
local function Update(self, event, unit) |
if(self.unit ~= unit) then return end |
local helpOrHarm = UnitIsFriend("player",unit) and "HELPFUL" or "HARMFUL" |
auras[lastAuraIndex].noTime = ( duration == 0 and expirationTime == 0) |
end |
end |
if self.AuraBars.sort then |
table.sort(auras, type(self.AuraBars.sort) == 'function' and self.AuraBars.sort or sort) |
end |
-- Show and configure bars for buffs/debuffs. |
local bars = self.AuraBars.bars |
for index = 1 , lastAuraIndex do |