Fixed an energy ticker bug

This commit is contained in:
iceroth
2006-08-02 13:19:11 +00:00
parent 3478238114
commit ae964ef179

View File

@ -4,6 +4,7 @@ local PlayerMana = AceOO.Class(IceUnitBar)
PlayerMana.prototype.manaType = nil
PlayerMana.prototype.tickStart = nil
PlayerMana.prototype.previousEnergy = nil
-- Constructor --
function PlayerMana.prototype:init()
@ -143,8 +144,12 @@ function PlayerMana.prototype:UpdateEnergy(unit)
return
end
self.tickStart = GetTime()
self.tickerFrame:Show()
if (not (self.previousEnergy) or (self.previousEnergy <= UnitMana(self.unit))) then
self.previousEnergy = UnitMana(self.unit)
self.tickStart = GetTime()
self.tickerFrame:Show()
end
self:Update(unit)
end