When I log into my Paladin, it shows all three HolyRunes, as if I have all three active. But when I cast Crusader Strike, They all dissapear and only show one. It ain't updating though when I reload or log in and out, showing all three as if all three were active until I use Crusader Strike to refresh its 'display' so to speak.
Here is my code.
Code:
local _, class = UnitClass("player")
if class == "PALADIN" then
self.HolyPower = CreateFrame("Frame", nil, self)
self.HolyPower:SetPoint("TOPRIGHT", self, "BOTTOMRIGHT", 1, rypos)
self.HolyPower:SetSize(239 * PlayerScale/3 - 5, rht)
self.HolyPower.anchor = ranchor
self.HolyPower.growth = rgrwth
for i = 1, 3 do
self.HolyPower[i] = CreateFrame("StatusBar", nil, self.HolyPower)
self.HolyPower[i]:SetStatusBarTexture(bartex)
self.HolyPower[i]:SetSize(239 * PlayerScale/3 - 5, rht)
self.HolyPower[i]:SetStatusBarColor(1,.95,.33)
if i == 1 then
self.HolyPower[i]:SetPoint("TOPLEFT", self.HolyPower, "TOPLEFT")
else
self.HolyPower[i]:SetPoint("RIGHT", self.HolyPower[i - 1], "LEFT", RxSpacing, RySpacing)
end
self.HolyPower[i].bg = self.HolyPower[i]:CreateTexture(nil, "BACKGROUND")
self.HolyPower[i].bg:SetAllPoints(self.HolyPower[i])
self.HolyPower[i].bg:SetTexture(bartex)
self.HolyPower[i].bg.multiplier = .2
self.HolyPower[i].bg:SetVertexColor(0.10, 0.10, 0.10)
self.HolyPower[i].bd = CreateFrame("Frame", nil, self.HolyPower[i])
self.HolyPower[i].bd:SetPoint("TOPLEFT", self.HolyPower[i], "TOPLEFT", 0, 0)
self.HolyPower[i].bd:SetPoint("BOTTOMRIGHT", self.HolyPower[i], "BOTTOMRIGHT", 0, 0)
self.HolyPower[i].bd:SetFrameStrata("LOW")
self.HolyPower[i].bd:SetBackdrop(backdrop)
self.HolyPower[i].bd:SetBackdropColor(0, 0, 0, 1)
self.HolyPower[i].bd:SetBackdropBorderColor(0, 0, 0)
end
end
It works fine. When I go and attack something, it refreshes and tells me my real stacks of holypower, but when I reload or log out and back in, its showing all three possible holypower stacks instead of if I only had one previous to reloading the UI.