Permalink
Browse files

Fixed for layouts without oUF Castbar

git-svn-id: svn://svn.wowinterface.com/oUF_BarFader-229/trunk@4 cbe42a47-3b53-4817-a5a9-47e79666164c
  • Loading branch information...
1 parent 29a1c08 commit 34fbd236afd30eadd2cf6daba710d73ae780dd06 p3lim-52096 committed Aug 29, 2008
Showing with 8 additions and 8 deletions.
  1. +8 −8 oUF_BarFader/oUF_BarFader.lua
View
16 oUF_BarFader/oUF_BarFader.lua
@@ -9,23 +9,23 @@ local function UpdateElement(self)
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

0 comments on commit 34fbd23

Please sign in to comment.