mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50: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.manaType = nil
|
||||||
PlayerMana.prototype.tickStart = nil
|
PlayerMana.prototype.tickStart = nil
|
||||||
|
PlayerMana.prototype.previousEnergy = nil
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function PlayerMana.prototype:init()
|
function PlayerMana.prototype:init()
|
||||||
@ -143,8 +144,12 @@ function PlayerMana.prototype:UpdateEnergy(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (not (self.previousEnergy) or (self.previousEnergy <= UnitMana(self.unit))) then
|
||||||
|
self.previousEnergy = UnitMana(self.unit)
|
||||||
self.tickStart = GetTime()
|
self.tickStart = GetTime()
|
||||||
self.tickerFrame:Show()
|
self.tickerFrame:Show()
|
||||||
|
end
|
||||||
|
|
||||||
self:Update(unit)
|
self:Update(unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user