feat(filters): match aura whitelist/blacklist by spell ID, not just name
release / release (push) Successful in 3s

CoA's 3.3.5 client returns spellId as the 11th UnitAura value (stock 3.3.5a
stops at 10). The scan loop now captures it and the whitelist/blacklist match
on name OR spellId. The filter 'add' box accepts a numeric spell ID (stored as
a numeric key so it matches UnitAura's spellId) and the list view resolves IDs
to 'Name (ID)' via GetSpellInfo. Fixes ambiguity from name-only matching where
CoA custom spells share display names across ranks/variants.
This commit is contained in:
2026-05-31 15:11:21 +02:00
parent ad2a536efe
commit d241fd1b5e
3 changed files with 22 additions and 7 deletions
+15 -4
View File
@@ -3760,14 +3760,17 @@ local function loadFilterOptions()
add = {
order = 0,
type = "input",
name = L["Aura name"],
name = L["Aura name or spell ID"],
desc = L["Enter an exact aura name, or a numeric spell ID for precise matching (CoA's client exposes aura spell IDs)."],
--dialogControl = "Aura_EditBox",
hidden = false,
set = function(info, value)
local filterType = info[#(info) - 3]
local filter = filterMap[info[#(info) - 2]]
ShadowUF.db.profile.filters[filterType][filter][value] = true
-- A purely-numeric entry is stored as a number so it matches the
-- spellId returned by UnitAura; anything else stays a name string.
ShadowUF.db.profile.filters[filterType][filter][tonumber(value) or value] = true
reloadUnitAuras()
rebuildFilters()
@@ -3844,9 +3847,17 @@ local function loadFilterOptions()
type = "description",
-- Odd I know, AceConfigDialog-3.0 expands descriptions to full width if width is nil
-- on the other hand we can't set width to "normal" so tricking it
width = "",
width = "",
fontSize = "medium",
name = function(info) return spellMap[info[#(info)]] end,
name = function(info)
local entry = spellMap[info[#(info)]]
-- Numeric entries are spell IDs; show "Name (ID)" when the client can resolve it.
if( type(entry) == "number" ) then
local spellName = GetSpellInfo(entry)
return spellName and string.format("%s (%d)", spellName, entry) or tostring(entry)
end
return entry
end,
}
local spellRow = {