fix(catalog): never tooltip-scan advancement IDs as spell IDs

Entries with no backing spell (spellId == 0) fell through to
SetHyperlink("spell:" .. entry.ID), aliasing CoA advancement IDs into
real 3.3.5 spell-ID space - ~3800 rows captured an unrelated spell's
tooltip and adopted its first line as the entry NAME. Spell-less
entries now get an empty tooltip and keep the "ID:<id>" name.
This commit is contained in:
Florian Andrew George Berthold 2026-06-10 02:15:31 +02:00
parent d0999ebda3
commit 3662193dda

View file

@ -166,9 +166,17 @@ function C.Run(filter, callback)
end
end
-- Only tooltip-scan entries with a backing spell. Advancement
-- IDs are NOT spell IDs - SetHyperlink("spell:" .. entry.ID)
-- would alias them into real 3.3.5 spell-ID space and capture
-- some unrelated spell's tooltip (and adopt its first line as
-- the entry name).
local name, _, icon
if spellId > 0 then name, _, icon = GetSpellInfo(spellId) end
local tooltip = GetCatalogTooltip(spellId > 0 and spellId or entry.ID)
local tooltip = ""
if spellId > 0 then
name, _, icon = GetSpellInfo(spellId)
tooltip = GetCatalogTooltip(spellId)
end
if not name or name == "" then
name = tooltip:match("^([^\n]+)") or ("ID:" .. tostring(entry.ID))
end