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:
Parnic
2016-06-01 00:11:33 -05:00
parent debaf7f1ff
commit f214c945af
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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()