diff --git a/Core/Core.lua b/Core/Core.lua index 175eb4b..5c9ab93 100755 --- a/Core/Core.lua +++ b/Core/Core.lua @@ -32,4 +32,5 @@ function BetterCooldownManager:OnEnable() BCDM:CreateCooldownViewerOverlays() end) BCDM:SetupEditModeManager() + C_Timer.After(1, function() BCDM:RestoreMirrorFrames() end) end diff --git a/Core/EventManager.lua b/Core/EventManager.lua index 4644343..126526d 100755 --- a/Core/EventManager.lua +++ b/Core/EventManager.lua @@ -56,8 +56,12 @@ function BCDM:SetupEventManager() if unit ~= "player" then return end LEMO:ApplyChanges() BCDM:UpdateBCDM() + BCDM:RestoreMirrorFrames() else BCDM:UpdateBCDM() + if event == "PLAYER_ENTERING_WORLD" or event == "LOADING_SCREEN_DISABLED" then + C_Timer.After(1, function() BCDM:RestoreMirrorFrames() end) + end end end) end diff --git a/Core/Globals.lua b/Core/Globals.lua index 6cd0fbf..13ace51 100755 --- a/Core/Globals.lua +++ b/Core/Globals.lua @@ -637,3 +637,28 @@ StaticPopupDialogs["BCDM_RELOAD"] = { function BCDM:PromptReload() StaticPopup_Show("BCDM_RELOAD") end + +function BCDM:RestoreMirrorFrames() + local container = MirrorTimerContainer or MirrorTimerFrame + if not container then + return + end + + container:Show() + container:Raise() + + for i = 1, 5 do + local mirror = _G["MirrorTimer" .. i] or _G["MirrorTimer" .. i .. "Bar"] + if mirror then + mirror:Show() + mirror:Raise() + if mirror.Update then + mirror:Update() + end + end + end + + if MirrorTimerFrame_Update then + MirrorTimerFrame_Update() + end +end diff --git a/Modules/CastBar.lua b/Modules/CastBar.lua index 7e02db1..200741e 100755 --- a/Modules/CastBar.lua +++ b/Modules/CastBar.lua @@ -243,7 +243,10 @@ function BCDM:CreateCastBar() if CastBarDB.Icon.Enabled then CastBar.Icon:Show() else CastBar.Icon:Hide() end CastBar:Hide() - PlayerCastingBarFrame:UnregisterAllEvents() + PlayerCastingBarFrame:SetAlpha(0) + PlayerCastingBarFrame:EnableMouse(false) + PlayerCastingBarFrame:SetScript("OnShow", nil) + PlayerCastingBarFrame:SetScript("OnHide", nil) end end