mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -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
|
||||
|
Reference in New Issue
Block a user