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 },