From f6683b31af952860258894e0d403b9d7cc5ba3f4 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 6 Jul 2026 03:04:17 -0500 Subject: [PATCH] Clear castbar unlock preview when leaving unlock mode The unlock preview drives the bar via alpha: the OnUpdate forces alpha=1 while the drag handle is shown. On lock, with no active cast (endTime nil) and no fadeout, the idle branch returned early and left the empty bar stuck at alpha 1. Reset leftover alpha to 0 in that branch so the preview clears once the drag handle hides. Fixes #16. --- modules/castbar.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/castbar.lua b/modules/castbar.lua index c2c920da..71c76eec 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -241,7 +241,10 @@ pfUI:RegisterModule("castbar", function () return end - if not this.endTime then return end + if not this.endTime then + if this:GetAlpha() ~= 0 then this:SetAlpha(0) end + return + end -- Non-player bars: if the unit disappears (target died / detarget), -- drop the bar immediately.