From 0c729d77e90d9e034da21ebc07c407bb665ee31c Mon Sep 17 00:00:00 2001 From: Parnic Date: Mon, 5 Sep 2016 21:50:43 -0500 Subject: [PATCH] Amended 29dc1b89 to be controlled by its own option Instead of changing a behavior that's years old out from under people, let's make it opt-in. --- modules/PlayerMana.lua | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua index 423bf58..b09f756 100644 --- a/modules/PlayerMana.lua +++ b/modules/PlayerMana.lua @@ -100,6 +100,27 @@ end order = 53 } + opts["scaleManaColorForAll"] = { + type = "toggle", + name = L["Scale for non-mana users"], + desc = L["Uses the 'color bar by mana %' setting/colors even for classes that don't use Mana"], + width = 'double', + get = function() + return self.moduleSettings.scaleManaColorForAll + end, + set = function(info, value) + self.moduleSettings.scaleManaColorForAll = value + self:Redraw() + end, + disabled = function() + return not self.moduleSettings.enabled + end, + hidden = function() + return not self.moduleSettings.scaleManaColor + end, + order = 53.1 + } + return opts end @@ -284,7 +305,7 @@ function PlayerMana.prototype:Update(unit, powertype) local color = "PlayerMana" if not (self.alive) then color = "Dead" - elseif (self.moduleSettings.scaleManaColor) then + elseif (self.moduleSettings.scaleManaColor and (UnitPowerType(self.unit) == SPELL_POWER_MANA or self.moduleSettings.scaleManaColorForAll)) then color = "ScaledManaColor" else if (self.manaType == SPELL_POWER_RAGE) then