mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 13:30:50 +00:00
unitframes: clear stale aura swirl on target swap
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.
This commit is contained in:
@@ -1902,6 +1902,8 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
end
|
end
|
||||||
if duration > 0 then
|
if duration > 0 then
|
||||||
CooldownFrame_SetTimer(unit.buffs[i].cd, start, duration, 1)
|
CooldownFrame_SetTimer(unit.buffs[i].cd, start, duration, 1)
|
||||||
|
else
|
||||||
|
CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0)
|
||||||
end
|
end
|
||||||
elseif aura.duration > 0 then
|
elseif aura.duration > 0 then
|
||||||
local guid = UnitGUID(unitstr)
|
local guid = UnitGUID(unitstr)
|
||||||
@@ -1912,6 +1914,8 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
else
|
else
|
||||||
CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0)
|
CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
unit.buffs[i]:Hide()
|
unit.buffs[i]:Hide()
|
||||||
@@ -2005,7 +2009,11 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
end
|
end
|
||||||
if duration > 0 then
|
if duration > 0 then
|
||||||
CooldownFrame_SetTimer(unit.debuffs[i].cd, start, duration, 1)
|
CooldownFrame_SetTimer(unit.debuffs[i].cd, start, duration, 1)
|
||||||
|
else
|
||||||
|
CooldownFrame_SetTimer(unit.debuffs[i].cd, 0, 0, 0)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
CooldownFrame_SetTimer(unit.debuffs[i].cd, 0, 0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if stacks > 1 then
|
if stacks > 1 then
|
||||||
|
|||||||
Reference in New Issue
Block a user