diff --git a/main.lua b/main.lua index c068968..b22efc8 100644 --- a/main.lua +++ b/main.lua @@ -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)