additional power bar hide

This commit is contained in:
Sergio Álvarez 2018-08-11 22:59:16 +02:00
parent 3a6438dd51
commit 7296dd76d9
1 changed files with 10 additions and 2 deletions

View File

@ -17,12 +17,16 @@ local bgColor = {
b = 0.1
}
-- PowerBar
-- PowerBar & AdditionalPowerBar
local function hook_PostUpdatePower(self)
self:SetStatusBarColor(color.r, color.g, color.b)
self.bg:SetVertexColor(bgColor.r, bgColor.g, bgColor.b)
end
local function hook_PostUpdateAdditionalPower(self)
self:Hide()
end
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(self)
@ -34,6 +38,11 @@ f:SetScript("OnEvent", function(self)
if power then
hooksecurefunc(power, "PostUpdate", hook_PostUpdatePower)
end
local apower = unitframe and unitframe.AdditionalPower
if apower then
hooksecurefunc(apower, "PostUpdate", hook_PostUpdateAdditionalPower)
end
end)
-- ClassBar
@ -51,5 +60,4 @@ local function hook_Configure_ClassBar(self, frame)
end
end
end
hooksecurefunc(UF, "Configure_ClassBar", hook_Configure_ClassBar)