- Expanded holy power to account for the now-5 rune maximum. Not sure what I'm going to do about this layout just yet. The default frame has two below the primary 3, but my class power base class doesn't have support for this type of layout. Will see what the users say.

- Fixed the old 3 runes to have appropriate texture coordinates.
This commit is contained in:
Parnic
2012-07-09 04:35:47 +00:00
parent 028658a2be
commit d6506e79c2
2 changed files with 30 additions and 5 deletions

View File

@ -6,6 +6,7 @@ local IceHUD = _G.IceHUD
IceClassPowerCounter.prototype.runeHeight = 22 IceClassPowerCounter.prototype.runeHeight = 22
IceClassPowerCounter.prototype.runeWidth = 36 IceClassPowerCounter.prototype.runeWidth = 36
IceClassPowerCounter.prototype.numRunes = 3 IceClassPowerCounter.prototype.numRunes = 3
IceClassPowerCounter.prototype.numConsideredFull = 99
IceClassPowerCounter.prototype.lastNumReady = 0 IceClassPowerCounter.prototype.lastNumReady = 0
IceClassPowerCounter.prototype.runeCoords = {} IceClassPowerCounter.prototype.runeCoords = {}
IceClassPowerCounter.prototype.runeShineFadeSpeed = 0.4 IceClassPowerCounter.prototype.runeShineFadeSpeed = 0.4
@ -443,9 +444,9 @@ function IceClassPowerCounter.prototype:UpdateRunePower()
end end
if self.moduleSettings.pulseWhenFull then if self.moduleSettings.pulseWhenFull then
if numReady > self.lastNumReady and numReady == self.numRunes then if numReady > self.lastNumReady and (numReady == self.numRunes or numReady >= self.numConsideredFull) then
self:StartRunesFullAnimation() self:StartRunesFullAnimation()
elseif numReady < self.numRunes then elseif numReady < self.numRunes and numReady < self.numConsideredFull then
self:StopRunesFullAnimation() self:StopRunesFullAnimation()
end end
end end

View File

@ -9,14 +9,18 @@ function HolyPower.prototype:init()
-- pulled from PaladinPowerBar.xml in Blizzard's UI source -- pulled from PaladinPowerBar.xml in Blizzard's UI source
self.runeCoords = self.runeCoords =
{ {
{0.00390625, 0.14453125, 0.64843750, 0.82031250}, {0.00390625, 0.14453125, 0.78906250, 0.96093750},
{0.00390625, 0.12500000, 0.83593750, 0.96875000}, {0.15234375, 0.27343750, 0.78906250, 0.92187500},
{0.15234375, 0.25781250, 0.64843750, 0.81250000}, {0.28125000, 0.38671875, 0.64843750, 0.81250000},
{0.28125000, 0.38671875, 0.82812500, 0.92187500},
{0.39453125, 0.49609375, 0.64843750, 0.74218750},
} }
self.numericColor = "HolyPowerNumeric" self.numericColor = "HolyPowerNumeric"
self.unitPower = SPELL_POWER_HOLY_POWER self.unitPower = SPELL_POWER_HOLY_POWER
self.minLevel = PALADINPOWERBAR_SHOW_LEVEL self.minLevel = PALADINPOWERBAR_SHOW_LEVEL
self.bTreatEmptyAsFull = true self.bTreatEmptyAsFull = true
self.unit = "player"
self.numConsideredFull = HOLY_POWER_FULL
end end
function HolyPower.prototype:GetOptions() function HolyPower.prototype:GetOptions()
@ -47,6 +51,26 @@ function HolyPower.prototype:HideBlizz()
PaladinPowerBar:UnregisterAllEvents() PaladinPowerBar:UnregisterAllEvents()
end end
function HolyPower.prototype:UpdateRunePower()
local numRunes = UnitPowerMax(self.unit, self.unitPower)
if self.fakeNumRunes ~= nil and self.fakeNumRunes > 0 then
numRunes = self.fakeNumRunes
end
if numRunes ~= self.numRunes then
if numRunes < self.numRunes and #self.frame.graphical >= numRunes then
for i=numRunes + 1, #self.frame.graphical do
self.frame.graphical[i]:Hide()
end
end
self.numRunes = numRunes
self:CreateRuneFrame()
end
HolyPower.super.prototype.UpdateRunePower(self)
end
-- Load us up -- Load us up
local _, unitClass = UnitClass("player") local _, unitClass = UnitClass("player")
if (unitClass == "PALADIN" and IceHUD.WowVer >= 40000) then if (unitClass == "PALADIN" and IceHUD.WowVer >= 40000) then