diff --git a/Modules/Misc/AutoScreenShot.lua b/Modules/Misc/AutoScreenShot.lua index f431cf82..285f082a 100644 --- a/Modules/Misc/AutoScreenShot.lua +++ b/Modules/Misc/AutoScreenShot.lua @@ -1,5 +1,6 @@ local W, F, E, L = unpack((select(2, ...))) local M = W.Modules.Misc +local CA = W:GetModule("CombatAlert") local _G = _G local hooksecurefunc = hooksecurefunc @@ -17,8 +18,18 @@ function M:DelayScreenshot(_, _, _, tried) E:Delay(0.5, function() if alertFrame and alertFrame.IsShown and alertFrame:IsShown() and _G.Screenshot then + local handleCombatAlert = CA and CA.db and CA.db.enable and CA.alert:IsShown() + if handleCombatAlert then + CA.alert:Hide() + end + _G.Screenshot() alertFrame = nil + + if handleCombatAlert then + CA.alert:Show() + end + E:Delay(1, F.Print, L["Screenshot has been automatically taken."]) else self:DelayScreenshot(nil, nil, nil, tried + 1)