Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions EllesmereUICooldownManager/EllesmereUICdmBuffBars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -874,12 +874,19 @@ function _tbbWake.Sleep()
_tbbWake:RegisterUnitEvent("UNIT_AURA", "player")
_tbbWake:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", "player")
_tbbWake:RegisterEvent("PLAYER_REGEN_DISABLED")
-- A debuff the player left on a new target is live the moment it is selected, and
-- none of the player-scoped edges above can see that. Rare enough to wake on
-- without a probe.
_tbbWake:RegisterEvent("PLAYER_TARGET_CHANGED")
end
function _tbbWake.Wake()
_tbbWake:UnregisterAllEvents()
-- Stay subscribed to the aura edge while AWAKE: pool composition changes only on a
-- player aura event or a pool Acquire (hooked separately), retiring the assignment memo.
_tbbWake:RegisterUnitEvent("UNIT_AURA", "player")
-- Target changes rebind which auras the viewer's frames carry, so the awake branch
-- of OnEvent retires the assignment memo on this the same as any other non-aura edge.
_tbbWake:RegisterEvent("PLAYER_TARGET_CHANGED")
_tbbWake._idleTicks = 0
_tbbAssignDirty = true
_tbbReflowDirty = true
Expand Down Expand Up @@ -5204,6 +5211,10 @@ function ns.UpdateTrackedBuffBarTimers()
-- Liveness for the idle sleeper: set by any branch below that is actually animating or tracking something this tick.
local tickLive = false

-- Resolved once per tick, not per bar: the bind-miss fallback below asks the target
-- for a debuff the player applied, and there is no point asking with nothing targeted.
local hasTarget = UnitExists and UnitExists("target") and true or false

-- Profile-wide smooth-fill switches, resolved once per tick for every fill site (absent buffs key = enabled; absent cooldowns key = OFF).
local sm
do
Expand Down Expand Up @@ -5314,6 +5325,25 @@ function ns.UpdateTrackedBuffBarTimers()
if not fbAura and cfg.baseSpellID and cfg.baseSpellID > 0 then
fbAura = C_UnitAuras.GetPlayerAuraBySpellID(cfg.baseSpellID)
end
-- Same net for a debuff the player put on the TARGET, which the queries
-- above can never see. Blizzard's viewer stalls exactly there after a
-- macro that clears and restores the target inside one frame: its
-- OnPlayerTargetChanged compares GUIDs, sees the same one it stored, and
-- never refreshes, so the item stays inactive until a real target switch.
if not fbAura and hasTarget and C_UnitAuras.GetUnitAuraBySpellID then
fbAura = C_UnitAuras.GetUnitAuraBySpellID("target", cfg.spellID)
if not fbAura and cfg.baseSpellID and cfg.baseSpellID > 0 then
fbAura = C_UnitAuras.GetUnitAuraBySpellID("target", cfg.baseSpellID)
end
-- Somebody else's copy of the same debuff must not drive our bar.
-- sourceUnit reads secret on an enemy in restricted content, so only
-- a READABLE mismatch rejects; an unreadable one is left to show.
local src = fbAura and fbAura.sourceUnit
if src and not (issecretvalue and issecretvalue(src))
and src ~= "player" then
fbAura = nil
end
end
-- Fallback driving means the viewer has not bound this aura yet, and
-- Blizzard's late-bind can land WITHOUT a fresh player aura event. Keep
-- the memo dirty while any fallback is live so the next tick re-pairs
Expand Down
4 changes: 4 additions & 0 deletions EllesmereUICooldownManager/EllesmereUICdmHooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10222,6 +10222,10 @@ function ns.SetupViewerHooks()
cdmBuffTickFrame:RegisterUnitEvent("UNIT_AURA", "player")
cdmBuffTickFrame:RegisterEvent("PLAYER_TOTEM_UPDATE")
cdmBuffTickFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
-- Target-applied auras bind and release on this edge and on no player-scoped
-- one, so without it a tracked debuff's glow could only be picked up by the
-- 1s staleness net below, or not at all once the ticker had settled.
cdmBuffTickFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
cdmBuffTickFrame:SetScript("OnEvent", function(_, event, _, updateInfo)
ns._btDirty = true
-- Gen bump on anything that can CHANGE which auras are active: additions
Expand Down