From c37907305e01f424b4c5af99dc63d9ef209edf11 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 5 Mar 2020 18:36:28 +0100 Subject: [PATCH] unitframes: add queue for combatlockdown refreshs --- api/unitframes.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 98f67a77..6bf541b6 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1,9 +1,19 @@ -pfUI.uf = CreateFrame("Frame",nil,UIParent) -pfUI.uf.frames = {} - -- load pfUI environment setfenv(1, pfUI:GetEnvironment()) +pfUI.uf = CreateFrame("Frame", nil, UIParent) +pfUI.uf:SetScript("OnUpdate", function() + if InCombatLockdown and not InCombatLockdown() then + for frame in pairs(pfUI.uf.delayed) do + frame:UpdateVisibility() + pfUI.uf.delayed[frame] = nil + end + end +end) + +pfUI.uf.frames = {} +pfUI.uf.delayed = {} + local glow = { edgeFile = pfUI.media["img:glow"], edgeSize = 8, insets = {left = 0, right = 0, top = 0, bottom = 0},