WoWInterface SVN oUF_AuraBars

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 18 to Rev 19
    Reverse comparison

Rev 18 → Rev 19

trunk/oUF_AuraBars/oUF_AuraBars.lua
154,11 → 154,16
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"
186,7 → 191,11
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