WoWInterface SVN Bison1

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 34 to Rev 35
    Reverse comparison

Rev 34 → Rev 35

BuffBar.lua
8,9 → 8,6
------------------------------------------------------------------------------------]]
local updateTimeBuff = 0
local updateTimeWeapon = 0.1
local flashTime = 0
local flashState = true
local alphaValue = 1
 
--[[---------------------------------------------------------------------------------
BisonButton
140,7 → 137,7
self:Tooltip()
end
end
self:Alpha( alphaValue)
self:SetFlashing()
end
 
function BisonButton:Duration()
166,11 → 163,23
end
end
 
function BisonButton:Alpha( alpha)
if self.bar.values.flashing and self.timeLeft and self.timeLeft < BUFF_WARNING_TIME then
self:SetAlpha( alpha)
function BisonButton:SetFlashing()
local shouldFlash = self.bar.values.flashing and self.timeLeft
if shouldFlash then
if self.duration and self.duration < BUFF_WARNING_TIME then
shouldFlash = self.timeLeft < self.duration/2
else
shouldFlash = self.timeLeft < BUFF_WARNING_TIME
end
end
 
if shouldFlash then
if not UIFrameIsFading(self) then
UIFrameFlash(self, 0.2, 0.2, self.timeLeft, true, 0, 0.7)
end
else
self:SetAlpha( 1.0)
self:SetAlpha(1)
UIFrameFlashRemoveFrame(self)
end
end
 
213,6 → 222,7
local name, rank, texture, count, debuffType, duration, expiration = UnitAura( PlayerFrame.unit, self:GetID(), self.buffFilter)
if name then
self.buffName = name
self.duration = duration
if duration > 0 and expiration then
self.timeLeft = expiration - GetTime()
else
220,7 → 230,7
end
self:Duration()
self:Texture( texture)
self:Alpha( 1.0)
self:SetFlashing()
self:Count( count)
self:Border( name, debuffType)
self:Show()
228,6 → 238,7
else
self.buffName = nil
self.timeLeft = nil
self.duration = nil
self:Duration()
self:Texture( nil)
self:Count( 0)
245,6 → 256,7
if hasEnchant then
self.buffName = ''
self.timeLeft = timeLeft and (timeLeft / 1000)
self.duration = 0
self:Duration()
self:Texture( GetInventoryItemTexture( PlayerFrame.unit, self:GetID()))
self:Count( charges)
417,17 → 429,6
else
updateTimeBuff = updateTimeBuff - elapsed
end
flashTime = flashTime - elapsed
if flashTime < 0 then
flashTime = flashTime + (flashState and BUFF_FLASH_TIME_OFF or BUFF_FLASH_TIME_ON)
flashState = not flashState
end
if flashState then
alphaValue = (BUFF_FLASH_TIME_ON - flashTime) / BUFF_FLASH_TIME_ON
else
alphaValue = flashTime / BUFF_FLASH_TIME_ON
end
alphaValue = (alphaValue * (1 - BUFF_MIN_ALPHA)) + BUFF_MIN_ALPHA
end
 
function BisonBar:OnUpdateWeapon( elapsed)
443,8 → 444,8
else
updateTimeWeapon = updateTimeWeapon - elapsed
end
btnMain:Alpha( alphaValue)
btnOff:Alpha( alphaValue)
btnMain:SetFlashing()
btnOff:SetFlashing()
end
 
function BisonBar:AddButtons( biGrp)