mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Fixed an energy ticker bug
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user