From 57261df235e5a06a2a03522d171b7791a18296d4 Mon Sep 17 00:00:00 2001 From: muleyo Date: Wed, 2 Oct 2024 16:06:23 +0200 Subject: [PATCH] Fixed Player ClassBar Hide option --- Modules/UnitFrames/_Player.lua | 92 +++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 35 deletions(-) diff --git a/Modules/UnitFrames/_Player.lua b/Modules/UnitFrames/_Player.lua index 7958302..ad2bd23 100755 --- a/Modules/UnitFrames/_Player.lua +++ b/Modules/UnitFrames/_Player.lua @@ -47,50 +47,72 @@ function Module:OnEnable() if not db.unitframes.cornericon then PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerPortraitCornerIcon:Hide() end + end) - if not db.classbar then - if RogueComboPointBarFrame then - RogueComboPointBarFrame:Hide() - end + PetFrame:HookScript("OnEvent", function(self, event) + if event == "PLAYER_ENTERING_WORLD" then + self.healthbar:SetStatusBarTexture(db.texture) + self.healthbar:GetStatusBarTexture():SetDrawLayer("BORDER") + end + end) + end - if MageArcaneChargesFrame then - MageArcaneChargesFrame:Hide() - end + if not db.classbar then + if RogueComboPointBarFrame then + RogueComboPointBarFrame:HookScript("OnEvent", function() + RogueComboPointBarFrame:Hide() + RogueComboPointBarFrame.Show = function() end + end) + end - if WarlockPowerFrame then - WarlockPowerFrame:Hide() - end + if MageArcaneChargesFrame then + MageArcaneChargesFrame:HookScript("OnEvent", function() + MageArcaneChargesFrame:Hide() + MageArcaneChargesFrame.Show = function() end + end) + end - if DruidComboPointBarFrame then - DruidComboPointBarFrame:Hide() - end + if WarlockPowerFrame then + WarlockPowerFrame:HookScript("OnEvent", function() + WarlockPowerFrame:Hide() + WarlockPowerFrame.Show = function() end + end) + end - if MonkHarmonyBarFrame then - MonkHarmonyBarFrame:Hide() - end + if DruidComboPointBarFrame then + DruidComboPointBarFrame:HookScript("OnEvent", function() + DruidComboPointBarFrame:Hide() + DruidComboPointBarFrame.Show = function() end + end) + end - if EssencePlayerFrame then - EssencePlayerFrame:Hide() - end + if MonkHarmonyBarFrame then + MonkHarmonyBarFrame:HookScript("OnEvent", function() + MonkHarmonyBarFrame:Hide() + MonkHarmonyBarFrame.Show = function() end + end) + end - if RuneFrame then - RuneFrame:Hide() - end + if EssencePlayerFrame then + EssencePlayerFrame:HookScript("OnEvent", function() + EssencePlayerFrame:Hide() + EssencePlayerFrame.Show = function() end + end) + end - if PaladinPowerBarFrame then - PaladinPowerBarFrame:HookScript("OnEvent", function() - PaladinPowerBarFrame:Hide() - end) - end - end - end) + if RuneFrame then + RuneFrame:HookScript("OnEvent", function() + RuneFrame:Hide() + RuneFrame.Show = function() end + end) + end - PetFrame:HookScript("OnEvent", function(self, event) - if event == "PLAYER_ENTERING_WORLD" then - self.healthbar:SetStatusBarTexture(db.texture) - self.healthbar:GetStatusBarTexture():SetDrawLayer("BORDER") - end - end) + if PaladinPowerBarFrame then + PaladinPowerBarFrame:HookScript("OnEvent", function() + PaladinPowerBarFrame:Hide() + PaladinPowerBarFrame.Show = function() end + end) + end end local statusTexture = PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.StatusTexture;