From ebfefb1712112d35963582f27c764233f2ace6b5 Mon Sep 17 00:00:00 2001 From: Krathe Date: Fri, 15 May 2026 01:44:16 +0100 Subject: [PATCH 1/3] Fix debuff icons persisting on dead frames --- Features/Auras.lua | 27 ++++++++++++++++++++++++++- Frames/Update.lua | 4 ++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Features/Auras.lua b/Features/Auras.lua index 9218dc40..dbfef8b9 100644 --- a/Features/Auras.lua +++ b/Features/Auras.lua @@ -2628,7 +2628,32 @@ end function DF:UpdateAuraIconsDirect(frame, icons, auraType, maxAuras) local unit = frame.unit local db = DF:GetFrameDB(frame) - + + -- Dead/ghost units: hide all aura icons immediately. WoW does not fire + -- UNIT_AURA on death, so the cache may still hold pre-death auras — + -- suppress them visually rather than displaying stale data on a corpse. + if UnitIsDeadOrGhost(unit) then + for i = 1, #icons do + local icon = icons[i] + icon.auraData = nil + icon.testAuraData = nil + icon.expirationTime = nil + icon.auraDuration = nil + if icon.duration then icon.duration:Hide() end + if icon.expiringTint then icon.expiringTint:Hide() end + if icon.expiringBorderAlphaContainer then + icon.expiringBorderAlphaContainer:Hide() + if icon.expiringBorderPulse and icon.expiringBorderPulse:IsPlaying() then + icon.expiringBorderPulse:Stop() + end + end + icon:Hide() + end + local countKey = auraType == "BUFF" and "buffDisplayedCount" or "debuffDisplayedCount" + frame[countKey] = 0 + return + end + -- Quick out: no cache = no approved auras = hide everything local cache = DF.BlizzardAuraCache[unit] local cacheSet = cache and (auraType == "BUFF" and cache.buffs or cache.debuffs) diff --git a/Frames/Update.lua b/Frames/Update.lua index 60db945d..66a4b088 100644 --- a/Frames/Update.lua +++ b/Frames/Update.lua @@ -1062,6 +1062,10 @@ function DF:UpdateHealthFast(frame) if DF.RestoreHealthBarFromReducedMax then DF:RestoreHealthBarFromReducedMax(frame) end end DF:ApplyDeadFade(frame, "Dead") + -- Clear aura icons — WoW doesn't fire UNIT_AURA on death so the cache + -- stays stale. UpdateAuraIconsDirect now has a dead guard, so calling + -- UpdateAuras_Enhanced here flushes any pre-death icons from the frame. + if DF.UpdateAuras_Enhanced then DF:UpdateAuras_Enhanced(frame) end return end From 1da97f8d3599d4c584391a48319f4a30c2059b6c Mon Sep 17 00:00:00 2001 From: Krathe Date: Fri, 15 May 2026 23:02:15 +0100 Subject: [PATCH 2/3] Add changelog entry for PR #85 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a332cd3..4595acd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * (Aura Designer) Banner controls no longer overlap when the settings window is narrow. (PR #81 by Krathe) * (Class Power) Fix Size, Colors, Position, and Show for Roles section headers showing as floating labels when Class Power Pips is disabled. (PR #82 by Krathe) +* Fix debuff icons remaining visible on frames after a unit dies. (PR #85 by Krathe) * (Defensive Icons) Fix icon borders missing on one or more sides when Pixel Perfect is enabled. (PR #79 by Krathe) * (Export Settings) Fix the "All" preset unchecking Pinned Frames, Aura Designer, and Auto Layouts. (PR #78 by Krathe) * (Global Fonts) Fix the Affected Elements list missing entries and being clipped. (PR #76 by Krathe) From 8b59edb253081e40aa5009989b3db3371ea642f8 Mon Sep 17 00:00:00 2001 From: Krathe Date: Sat, 16 May 2026 16:58:12 +0100 Subject: [PATCH 3/3] Avoid re-running AD engine on every tick while a unit stays dead Add edge-detect flag (dfLastKnownDead) so UpdateAuras_Enhanced is only called once on the dead transition, not on every subsequent UNIT_HEALTH event while the unit remains dead. Clears on the alive branch alongside ResetDeadFade so revival re-arms the flush for the next death. --- Frames/Update.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Frames/Update.lua b/Frames/Update.lua index 66a4b088..71e32e38 100644 --- a/Frames/Update.lua +++ b/Frames/Update.lua @@ -1062,15 +1062,20 @@ function DF:UpdateHealthFast(frame) if DF.RestoreHealthBarFromReducedMax then DF:RestoreHealthBarFromReducedMax(frame) end end DF:ApplyDeadFade(frame, "Dead") - -- Clear aura icons — WoW doesn't fire UNIT_AURA on death so the cache - -- stays stale. UpdateAuraIconsDirect now has a dead guard, so calling - -- UpdateAuras_Enhanced here flushes any pre-death icons from the frame. - if DF.UpdateAuras_Enhanced then DF:UpdateAuras_Enhanced(frame) end + -- Clear aura icons on the first dead tick only. WoW doesn't fire + -- UNIT_AURA on death so the cache stays stale; flushing once is enough. + -- The edge-detect flag prevents re-running the full AD engine on every + -- subsequent UNIT_HEALTH tick while the unit stays dead (e.g. wipe spam). + if not frame.dfLastKnownDead then + frame.dfLastKnownDead = true + if DF.UpdateAuras_Enhanced then DF:UpdateAuras_Enhanced(frame) end + end return end -- Unit is alive and connected - reset dead fade if it was applied DF:ResetDeadFade(frame) + frame.dfLastKnownDead = nil frame.dfLastKnownConnected = true -- Clear resurrection icon if unit was pending a res and is now alive