- added a configurable RunicPower color to the player, target, and tot mana bars

- made runic power behave like energy and rage for the "low threshold" flashing behavior
This commit is contained in:
Parnic
2009-02-26 03:57:33 +00:00
parent 2dba044681
commit 429fa4858e
4 changed files with 11 additions and 2 deletions

View File

@ -68,7 +68,7 @@ function IceUnitBar.prototype:GetOptions()
{
type = 'range',
name = '|cff22bb22Low Threshold|r',
desc = 'Threshold of pulsing the bar (0 means never) (for player applies only to mana, not rage/energy)',
desc = 'Threshold of pulsing the bar (0 means never) (for player applies only to mana, not rage/energy/runic power)',
get = function()
return self.moduleSettings.lowThreshold
end,

View File

@ -13,6 +13,7 @@ function PlayerMana.prototype:init()
self:SetDefaultColor("PlayerMana", 62, 54, 152)
self:SetDefaultColor("PlayerRage", 171, 59, 59)
self:SetDefaultColor("PlayerEnergy", 218, 231, 31)
self:SetDefaultColor("PlayerRunicPower", 62, 54, 152)
end
@ -223,6 +224,8 @@ function PlayerMana.prototype:Update(unit)
color = "PlayerRage"
elseif (self.manaType == 3) then
color = "PlayerEnergy"
elseif (self.manaType == 6) then
color = "PlayerRunicPower"
end
end
@ -261,7 +264,7 @@ end
-- OVERRIDE
function PlayerMana.prototype:UpdateBar(scale, color, alpha)
self.noFlash = (self.manaType ~= 0 and self.manaType ~= 6)
self.noFlash = (self.manaType ~= 0)
PlayerMana.super.prototype.UpdateBar(self, scale, color, alpha)
end

View File

@ -18,6 +18,7 @@ function IceTargetMana.prototype:init(moduleName, unit)
self:SetDefaultColor("TargetRage", 235, 44, 26)
self:SetDefaultColor("TargetEnergy", 228, 242, 31)
self:SetDefaultColor("TargetFocus", 242, 149, 98)
self:SetDefaultColor("TargetRunicPower", 52, 64, 221)
end
@ -95,6 +96,8 @@ function IceTargetMana.prototype:Update(unit)
self.color = "TargetFocus"
elseif (manaType == 3) then
self.color = "TargetEnergy"
elseif (manaType == 6) then
self.color = "TargetRunicPower"
end
if (self.tapped) then

View File

@ -10,6 +10,7 @@ function TargetTargetMana.prototype:init()
self:SetDefaultColor("TargetTargetRage", 235, 44, 26)
self:SetDefaultColor("TargetTargetEnergy", 228, 242, 31)
self:SetDefaultColor("TargetTargetFocus", 242, 149, 98)
self:SetDefaultColor("TargetTargetRunicPower", 52, 64, 221)
end
function TargetTargetMana.prototype:GetDefaultSettings()
@ -56,6 +57,8 @@ function TargetTargetMana.prototype:Update(unit)
self.color = "TargetTargetFocus"
elseif (manaType == 3) then
self.color = "TargetTargetEnergy"
elseif (manaType == 6) then
self.color = "TargetTargetRunicPower"
end
if (self.tapped) then