Fixed energy ticker resetting when spending energy

This commit is contained in:
Parnic
2019-08-28 19:49:50 -05:00
parent c016b0ccc0
commit 3e56595709

View File

@ -419,17 +419,17 @@ function PlayerMana.prototype:UpdateEnergy(event, unit)
return
end
self.previousEnergy = UnitPower(self.unit, UnitPowerType(self.unit))
if IceHUD.WowVer < 40000 then
self:Update(unit)
end
if self:ShouldUseTicker() and
((not (self.previousEnergy) or (self.previousEnergy <= UnitPower(self.unit, UnitPowerType(self.unit)))) and
((not (self.previousEnergy) or (self.previousEnergy < UnitPower(self.unit, UnitPowerType(self.unit)))) and
(self.moduleSettings.tickerEnabled) and self.manaType == SPELL_POWER_ENERGY) then
self.tickStart = GetTime()
self.tickerFrame:Show()
end
self.previousEnergy = UnitPower(self.unit, UnitPowerType(self.unit))
if IceHUD.WowVer < 40000 then
self:Update(unit)
end
end