- fix for a bug causing the runic power bar to sometimes not update if the player spent all of his remaining runic power at once (like hitting death coil with 40 runic power left)

This commit is contained in:
Parnic
2009-04-18 07:18:28 +00:00
parent a84910886e
commit f11192bfd1

View File

@ -196,14 +196,6 @@ function PlayerMana.prototype:Update(unit)
return
end
local powerType = UnitPowerType(self.unit)
if (self.manaPercentage == 1 and powerType ~= 1 and powerType ~= 6)
or (self.manaPercentage == 0 and (powerType == 1 or powerType == 6)) then
self:SetupOnUpdate(false)
elseif GetCVarBool("predictedPower") then
self:SetupOnUpdate(true)
end
-- the user can toggle the predictedPower cvar at any time and the addon will not get notified. handle it.
if not self.tickerFrame and self:ShouldUseTicker() then
self:CreateTickerFrame()
@ -231,6 +223,14 @@ function PlayerMana.prototype:Update(unit)
self:UpdateBar(self.manaPercentage, color)
local powerType = UnitPowerType(self.unit)
if (self.manaPercentage == 1 and powerType ~= 1 and powerType ~= 6)
or (self.manaPercentage == 0 and (powerType == 1 or powerType == 6)) then
self:SetupOnUpdate(false)
elseif GetCVarBool("predictedPower") then
self:SetupOnUpdate(true)
end
if self:ShouldUseTicker() then
-- hide ticker if rest of the bar is not visible
if (self.alpha == 0) then