From 5c5340104fac16bb29a96440e6088bdc74748a2a Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 2 Aug 2019 17:18:06 +0200 Subject: [PATCH] unlock: skip visibility updates in combat lockdown --- modules/unlock.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/unlock.lua b/modules/unlock.lua index e7e9d4aa..d09d0243 100644 --- a/modules/unlock.lua +++ b/modules/unlock.lua @@ -475,6 +475,14 @@ pfUI:RegisterModule("unlock", "vanilla:tbc", function () end) pfUI.unlock:SetScript("OnShow", function() + if this.skip then this.skip = nil return end + if InCombatLockdown and InCombatLockdown() then + DEFAULT_CHAT_FRAME:AddMessage(ERR_NOT_IN_COMBAT, 1, .2, .2) + this.skip = true + this:Hide() + return + end + this.grid = this.grid or DrawGrid() for name, frame in pairs(pfUI.movables) do @@ -493,6 +501,13 @@ pfUI:RegisterModule("unlock", "vanilla:tbc", function () end) pfUI.unlock:SetScript("OnHide", function() + if this.skip then this.skip = nil return end + if InCombatLockdown and InCombatLockdown() then + this.skip = true + this:Show() + return + end + for name, frame in pairs(pfUI.movables) do local frame = frame or _G[name]