Added new mana types to consider 0 as "full"

For the purposes of alpha settings, 0 is "full" for several mana types, such as the new/changed 7.0 ones (astral power, insanity, fury).
This commit is contained in:
Parnic
2016-07-19 23:45:51 -05:00
parent 5ca6f20944
commit 0ac00068b3

View File

@ -237,15 +237,16 @@ function PlayerMana.prototype:ManaType(event, unit)
end end
end end
if self.manaType == SPELL_POWER_RAGE or self.manaType == SPELL_POWER_RUNIC_POWER then self.bTreatEmptyAsFull = self:TreatEmptyAsFull()
self.bTreatEmptyAsFull = true
else
self.bTreatEmptyAsFull = false
end
self:Update(self.unit) self:Update(self.unit)
end end
function PlayerMana.prototype:TreatEmptyAsFull()
return self.manaType == SPELL_POWER_RAGE or self.manaType == SPELL_POWER_RUNIC_POWER
or (IceHUD.WowVer >= 70000 and (self.manaType == SPELL_POWER_LUNAR_POWER or self.manaType == SPELL_POWER_INSANITY
or self.manaType == SPELL_POWER_FURY))
end
function PlayerMana.prototype:UpdateEvent(event, unit, powertype) function PlayerMana.prototype:UpdateEvent(event, unit, powertype)
self:Update(unit, powertype) self:Update(unit, powertype)
@ -304,8 +305,8 @@ function PlayerMana.prototype:Update(unit, powertype)
self:ConditionalUpdateFlash() self:ConditionalUpdateFlash()
if (self.manaPercentage == 1 and self.manaType ~= SPELL_POWER_RAGE and self.manaType ~= SPELL_POWER_RUNIC_POWER) if (self.manaPercentage == 1 and not self:TreatEmptyAsFull())
or (self.manaPercentage == 0 and (self.manaType == SPELL_POWER_RAGE or self.manaType == SPELL_POWER_RUNIC_POWER)) then or (self.manaPercentage == 0 and self:TreatEmptyAsFull()) then
self:SetupOnUpdate(false) self:SetupOnUpdate(false)
else else
self:SetupOnUpdate(true) self:SetupOnUpdate(true)