From 69b2d8b63b16a5e602a291f1ee6a870a920ea7ec Mon Sep 17 00:00:00 2001 From: "vjekoslav.krenek@gmail.com" <313787825+svart2521@users.noreply.github.com> Date: Sat, 12 Sep 2026 01:57:39 +0200 Subject: [PATCH] Fix: Replace with Buff not routing Resonant Energy to Halo Bug: Issue: Resonant Energy resolves to three different spell ids depending on context (453850 the live player aura, 453845 the Cooldown Viewer's own canonical id, 453846 a third curated alt), and the "Replace with Buff" diversion only registered whichever single id the picker happened to store, so the swap lookup missed and the buff rendered as its own extra icon instead of taking Halo's slot. A related bug in the alt-lookup itself only linked a curated entry's primary id to each alt individually, not every member to every other member, so even adding the missing id would not have connected it to the others. Fix: Curated all three Resonant Energy ids together in EllesmereUI_BuffPresets.lua, and reworked the alt-lookup in EllesmereUICdmHooks.lua to link every id in one curated entry to every other id in that entry, then applied that expanded lookup to both the buff-diversion map and the cooldown-replacement-target map. --- .../EllesmereUICdmHooks.lua | 41 +++++++++++++++++++ EllesmereUI_BuffPresets.lua | 4 +- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/EllesmereUICooldownManager/EllesmereUICdmHooks.lua b/EllesmereUICooldownManager/EllesmereUICdmHooks.lua index 9ef501917..735675eec 100644 --- a/EllesmereUICooldownManager/EllesmereUICdmHooks.lua +++ b/EllesmereUICooldownManager/EllesmereUICdmHooks.lua @@ -1179,6 +1179,33 @@ function ns.RebuildSpellRouteMap() local IsBuffFamily = ns.IsBarBuffFamily + -- Curated buff alt ids, not talent overrides (GetBaseSpell is blind to + -- them). Any id in one curated group finds every other id in it. + local _buffPresetFamily + local function BuffPresetAltsFor(sid) + if not (EllesmereUI and EllesmereUI.BUFF_PRESETS) then return nil end + if not _buffPresetFamily then + _buffPresetFamily = {} + for _, spells in pairs(EllesmereUI.BUFF_PRESETS.spells) do + for id, info in pairs(spells) do + if info.alts then + local group = { id } + for i = 1, #info.alts do group[#group + 1] = info.alts[i] end + for i = 1, #group do + local a = group[i] + _buffPresetFamily[a] = _buffPresetFamily[a] or {} + for j = 1, #group do + local b = group[j] + if b ~= a then _buffPresetFamily[a][b] = true end + end + end + end + end + end + end + return _buffPresetFamily[sid] + end + -- Record an exact assignment plus its base when the assigned id is a variant -- form; same overwrite semantics as the direct sets (later pass wins). -- Assigned ids come from stored config (plain numbers), so no secret gating here -- the resolve side gates. @@ -1203,6 +1230,14 @@ function ns.RebuildSpellRouteMap() local varMap = isBuff and _divertedVarBaseBuff or _divertedVarBaseCD varMap[base] = barKey end + if isBuff then + local family = BuffPresetAltsFor(sid) + if family then + for altSid in pairs(family) do + SVV(targetMap, altSid, barKey, false, _divertedDirectBuff) + end + end + end end local function CollectDiversionsFor(bd, skipPositiveSet) @@ -1334,6 +1369,12 @@ function ns.RebuildSpellRouteMap() else StoreDirect(_divertedSpellsBuff, buffSid, bd.key) SVV(ns._buffReplaceTarget, buffSid, sid, false) + local family = BuffPresetAltsFor(buffSid) + if family then + for altSid in pairs(family) do + SVV(ns._buffReplaceTarget, altSid, sid, false) + end + end end end end diff --git a/EllesmereUI_BuffPresets.lua b/EllesmereUI_BuffPresets.lua index 94860b251..e39026a6b 100644 --- a/EllesmereUI_BuffPresets.lua +++ b/EllesmereUI_BuffPresets.lua @@ -181,7 +181,7 @@ spells = { [17] = { class = "PRIEST", alts = { 1246768, 1254306, 1300008 }, disabled = true }, [41635] = { class = "PRIEST", disabled = true }, [139] = { class = "PRIEST", disabled = true }, - [453846] = { class = "PRIEST", alts = { 453850 }, disabled = true }, + [453846] = { class = "PRIEST", alts = { 453850, 453845 }, disabled = true }, [1253593] = { class = "PRIEST", alts = { 1300009 }, disabled = true }, [207400] = { class = "SHAMAN", disabled = true }, [383648] = { class = "SHAMAN", alts = { 974 } }, @@ -230,7 +230,7 @@ spells = { [17] = { class = "PRIEST", alts = { 1246768, 1254306, 1300008 } }, [41635] = { class = "PRIEST" }, [139] = { class = "PRIEST" }, - [453846] = { class = "PRIEST", alts = { 453850 }, disabled = true }, + [453846] = { class = "PRIEST", alts = { 453850, 453845 }, disabled = true }, [1253593] = { class = "PRIEST", alts = { 1300009 } }, [207400] = { class = "SHAMAN", disabled = true }, [383648] = { class = "SHAMAN", alts = { 974 }, disabled = true },