From 9bdde0615081d8f5df48d02020d4ac2d671ca046 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sun, 28 Jun 2026 12:41:23 -0500 Subject: [PATCH] unitframes: clear stale aura swirl on target swap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Buff and debuff slots only called CooldownFrame_SetTimer on the `expirationTime > 0` (or `duration > 0` for buffs) paths. When the new target's aura at the same slot index had neither — permanent / passive auras like Retribution Aura — neither branch fired and the slot kept displaying the previous target's swirl/timer. Add an explicit 0/0/0 clear on every path that doesn't set a real timer, so the button always starts from a known state. Fixes #13. --- api/unitframes.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/unitframes.lua b/api/unitframes.lua index d368dec0..434fdb04 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1902,6 +1902,8 @@ function pfUI.uf:RefreshUnit(unit, component) end if duration > 0 then CooldownFrame_SetTimer(unit.buffs[i].cd, start, duration, 1) + else + CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0) end elseif aura.duration > 0 then local guid = UnitGUID(unitstr) @@ -1912,6 +1914,8 @@ function pfUI.uf:RefreshUnit(unit, component) else CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0) end + else + CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0) end else unit.buffs[i]:Hide() @@ -2005,7 +2009,11 @@ function pfUI.uf:RefreshUnit(unit, component) end if duration > 0 then CooldownFrame_SetTimer(unit.debuffs[i].cd, start, duration, 1) + else + CooldownFrame_SetTimer(unit.debuffs[i].cd, 0, 0, 0) end + else + CooldownFrame_SetTimer(unit.debuffs[i].cd, 0, 0, 0) end if stacks > 1 then