mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Added second argument to UnitPower
I keep seeing things online saying the one-argument version of UnitPower has been deprecated, so I figured I'd go ahead and update my few uses of it in case it actually gets removed at some point. I haven't had any trouble with it, though.
This commit is contained in:
@ -223,8 +223,8 @@ function IceUnitBar.prototype:Update()
|
||||
self.maxHealth = UnitHealthMax(self.unit)
|
||||
self.healthPercentage = self.maxHealth ~= 0 and (self.health/self.maxHealth) or 0
|
||||
|
||||
self.mana = UnitPower(self.unit)
|
||||
self.maxMana = UnitPowerMax(self.unit)
|
||||
self.mana = UnitPower(self.unit, UnitPowerType(self.unit))
|
||||
self.maxMana = UnitPowerMax(self.unit, UnitPowerType(self.unit))
|
||||
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
|
||||
|
||||
local locClass
|
||||
|
@ -355,13 +355,13 @@ function PlayerMana.prototype:UpdateEnergy(event, unit)
|
||||
return
|
||||
end
|
||||
|
||||
self.previousEnergy = UnitPower(self.unit)
|
||||
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))) 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()
|
||||
|
Reference in New Issue
Block a user