From 841e903d8d595607e63abd29ecf55737a48cce4e Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 30 Oct 2010 18:35:19 +0000 Subject: [PATCH] - made class power counters continue to display as long as they're not full/empty (depending on the class) --- modules/ClassPowerCounter.lua | 12 ++++++++++++ modules/HolyPower.lua | 2 ++ 2 files changed, 14 insertions(+) diff --git a/modules/ClassPowerCounter.lua b/modules/ClassPowerCounter.lua index 12f9b64..1dc180f 100644 --- a/modules/ClassPowerCounter.lua +++ b/modules/ClassPowerCounter.lua @@ -370,6 +370,8 @@ function IceClassPowerCounter.prototype:DisplayCounter() if (self.moduleSettings.hideBlizz) then self:HideBlizz() end + + self:UpdateRunePower() end function IceClassPowerCounter.prototype:Disable(core) @@ -427,6 +429,7 @@ function IceClassPowerCounter.prototype:UpdateRunePower() end self.lastNumReady = numReady + self:UpdateAlpha() if (self.moduleSettings.hideBlizz) then self:HideBlizz() @@ -645,3 +648,12 @@ end function IceClassPowerCounter.prototype:HideBlizz() assert(true, "Must override HideBlizz in child classes.") end + +function IceClassPowerCounter.prototype:UseTargetAlpha() + if self.bTreatEmptyAsFull then + return self.lastNumReady > 0 + else + return self.lastNumReady < self.numRunes + end +end + diff --git a/modules/HolyPower.lua b/modules/HolyPower.lua index 6967661..ccadf6e 100644 --- a/modules/HolyPower.lua +++ b/modules/HolyPower.lua @@ -16,6 +16,7 @@ function HolyPower.prototype:init() self.numericColor = "HolyPowerNumeric" self.unitPower = SPELL_POWER_HOLY_POWER self.minLevel = PALADINPOWERBAR_SHOW_LEVEL + self.bTreatEmptyAsFull = true end function HolyPower.prototype:GetOptions() @@ -51,3 +52,4 @@ local _, unitClass = UnitClass("player") if (unitClass == "PALADIN" and IceHUD.WowVer >= 40000) then IceHUD.HolyPower = HolyPower:new() end +