From 51e2debc4dd37c24fa4655836bda91a3b1305856 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 22 Mar 2022 15:58:10 -0500 Subject: [PATCH] Change method of hiding the player frame This existing method worked fine for many years, but seems to have become inadequate in 9.2, likely due to this change that's restoring player frame visibility sometimes: https://github.com/Gethe/wow-ui-source/commit/20f786e45b67c62fc855b151448b539542ccc865 Fixes #19 (Github) --- modules/PlayerHealth.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index 8da66a2..523109d 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -1407,15 +1407,18 @@ end function PlayerHealth.prototype:ShowBlizz() - PlayerFrame:Show() - PlayerFrame:GetScript("OnLoad")(PlayerFrame) + PlayerFrame:SetParent(self.OriginalPlayerFrameParent or UIParent) end function PlayerHealth.prototype:HideBlizz() - PlayerFrame:Hide() + if not self.PlayerFrameParent then + self.PlayerFrameParent = CreateFrame("Frame") + self.PlayerFrameParent:Hide() + end - PlayerFrame:UnregisterAllEvents() + self.OriginalPlayerFrameParent = PlayerFrame:GetParent() + PlayerFrame:SetParent(self.PlayerFrameParent) end function PlayerHealth.prototype:HideBlizzardParty()