mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Show text on Absorb and AltMana with DogTags disabled
This commit is contained in:
@ -76,6 +76,7 @@ function PlayerAltMana.prototype:Update()
|
||||
|
||||
self.PlayerAltMana = UnitPower(self.unit, SPELL_POWER_MANA)
|
||||
self.PlayerAltManaMax = UnitPowerMax(self.unit, SPELL_POWER_MANA)
|
||||
self.PlayerAltManaPercentage = self.PlayerAltManaMax ~= 0 and (self.PlayerAltMana/self.PlayerAltManaMax) or 0
|
||||
|
||||
if (not self.alive or not ShouldShow(self.unit) or not self.PlayerAltMana or not self.PlayerAltManaMax or self.PlayerAltManaMax == 0) then
|
||||
self:Show(false)
|
||||
@ -84,6 +85,16 @@ function PlayerAltMana.prototype:Update()
|
||||
self:Show(true)
|
||||
end
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
||||
self:SetBottomText1(math.floor(self.PlayerAltManaPercentage * 100))
|
||||
|
||||
if (self.PlayerAltManaMax ~= 100) then
|
||||
self:SetBottomText2(self:GetFormattedText(self:Round(self.PlayerAltMana), self:Round(self.PlayerAltManaMax)), "PlayerMana")
|
||||
else
|
||||
self:SetBottomText2()
|
||||
end
|
||||
end
|
||||
|
||||
self:UpdateBar(self.PlayerAltManaMax ~= 0 and self.PlayerAltMana / self.PlayerAltManaMax or 0, "PlayerAltMana")
|
||||
end
|
||||
|
||||
|
@ -63,12 +63,22 @@ function IceTargetAbsorb.prototype:UpdateAbsorbAmount(event, unit)
|
||||
self.highestAbsorbSinceLastZero = absorbAmount
|
||||
end
|
||||
|
||||
self.absorbPercent = self.highestAbsorbSinceLastZero ~= 0 and absorbAmount / self.highestAbsorbSinceLastZero or 0
|
||||
|
||||
if absorbAmount <= 0 or self.highestAbsorbSinceLastZero <= 0 then
|
||||
self:Show(false)
|
||||
else
|
||||
self:Show(true)
|
||||
self:UpdateBar(absorbAmount / self.highestAbsorbSinceLastZero, self.ColorName)
|
||||
end
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
||||
if (self.PlayerAltManaMax ~= 100) then
|
||||
self:SetBottomText1(self:GetFormattedText(self:Round(absorbAmount)), self.ColorName)
|
||||
else
|
||||
self:SetBottomText1()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function IceTargetAbsorb.prototype:Disable(core)
|
||||
|
Reference in New Issue
Block a user