Skip to content

Commit

Permalink
Fixed Player ClassBar Hide option
Browse files Browse the repository at this point in the history
  • Loading branch information
muleyo committed Oct 2, 2024
1 parent f5c65f4 commit 57261df
Showing 1 changed file with 57 additions and 35 deletions.
92 changes: 57 additions & 35 deletions Modules/UnitFrames/_Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57261df

Please sign in to comment.