WoWInterface SVN oUF_BarFader

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

oUF_BarFader/oUF_BarFader.lua
9,23 → 9,23
self:SetAlpha(1)
elseif(UnitExists('target')) then
self:SetAlpha(1)
elseif(self.Castbar.casting) then
self:SetAlpha(1)
elseif(self.Castbar) then
self:SetAlpha(self.Castbar.casting and 1 or (self.BarFadeAlpha or 0.25))
else
self:SetAlpha(self.BarFade.alpha or 0.25)
self:SetAlpha(self.BarFadeAlpha or 0.25)
end
end
 
oUF:RegisterInitCallback(function(self)
local unit = self.unit
if(self.BarFade) then
local val = 0
local total = 0
local event = CreateFrame('Frame')
event:SetScript('OnUpdate', function(_, al)
val = val + al
if(val > 0.25) then
event:SetScript('OnUpdate', function(_, elapsed)
total = total + elapsed
if(total > 0.25) then
UpdateElement(self)
val = 0
total = 0
end
end)
end