mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- Fixed Holy Power only showing 3 max on login instead of 5.
This commit is contained in:
@ -29,6 +29,7 @@ function HolyPower.prototype:init()
|
||||
self.minLevel = PALADINPOWERBAR_SHOW_LEVEL
|
||||
self.bTreatEmptyAsFull = true
|
||||
self.unit = "player"
|
||||
self.numRunes = 5
|
||||
if IceHUD.WowVer >= 50000 then
|
||||
self.numConsideredFull = HOLY_POWER_FULL
|
||||
else
|
||||
@ -85,7 +86,7 @@ function HolyPower.prototype:HideBlizz()
|
||||
PaladinPowerBar:UnregisterAllEvents()
|
||||
end
|
||||
|
||||
function HolyPower.prototype:UpdateRunePower()
|
||||
function HolyPower.prototype:UpdateRunePower(event)
|
||||
local numRunes = UnitPowerMax(self.unit, self.unitPower)
|
||||
|
||||
if self.fakeNumRunes ~= nil and self.fakeNumRunes > 0 then
|
||||
@ -93,6 +94,7 @@ function HolyPower.prototype:UpdateRunePower()
|
||||
end
|
||||
|
||||
if numRunes ~= self.numRunes then
|
||||
local oldNumRunes = self.numRunes
|
||||
if numRunes < self.numRunes and #self.frame.graphical >= numRunes then
|
||||
for i=numRunes + 1, #self.frame.graphical do
|
||||
self.frame.graphical[i]:Hide()
|
||||
@ -101,6 +103,12 @@ function HolyPower.prototype:UpdateRunePower()
|
||||
self.numRunes = numRunes
|
||||
|
||||
self:CreateRuneFrame()
|
||||
|
||||
if numRunes > oldNumRunes then
|
||||
for i=oldNumRunes + 1, #self.frame.graphical do
|
||||
self.frame.graphical[i]:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
HolyPower.super.prototype.UpdateRunePower(self)
|
||||
end
|
||||
|
Reference in New Issue
Block a user