From eea59bc94a3fe9c86618ed0d3eac92e13d46c395 Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 13 Aug 2025 09:08:05 +0200 Subject: [PATCH] castbar: synchronize empty focus unit with castbar --- modules/castbar.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/castbar.lua b/modules/castbar.lua index 81496ef8..bb2b071e 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -284,6 +284,14 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function () -- keep unit values in sync with focus unitframe HookScript(pfUI.castbar.focus, "OnUpdate", function() + -- clear on empty focus frames + if pfUI.uf.focus.unitname == nil and pfUI.uf.focus.label == nil then + pfUI.castbar.focus.unitstr = nil + pfUI.castbar.focus.unitname = nil + return + end + + -- skip on initial values if pfUI.uf.focus.unitname == "focus" then return end if pfUI.uf.focus.unitname == "" then return end