(fix) SpellCache ignores gear icon now correctly

This commit is contained in:
NoM0Re
2025-03-14 16:44:15 +01:00
parent 83665d7b0b
commit b6d0bb7dce
+2 -2
View File
@@ -19,7 +19,7 @@ local bestIcon = {}
-- Builds a cache of name/icon pairs from existing spell data -- Builds a cache of name/icon pairs from existing spell data
-- This is a rather slow operation, so it's only done once, and the result is subsequently saved -- This is a rather slow operation, so it's only done once, and the result is subsequently saved
function spellCache.Build() function spellCache.Build()
if not cache then if not cache then
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.") error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end end
@@ -57,7 +57,7 @@ function spellCache.Build()
id = id + 1 id = id + 1
local name, _, icon = GetSpellInfo(id) local name, _, icon = GetSpellInfo(id)
if (icon == "Interface\\Icons\\trade_engineering") then -- 136243 is the a gear icon, we can ignore those spells if (icon and icon:lower() == "interface\\icons\\trade_engineering") then -- 136243 is the a gear icon, we can ignore those spells
misses = 0; misses = 0;
elseif name and name ~= "" and icon then elseif name and name ~= "" and icon then
cache[name] = cache[name] or {} cache[name] = cache[name] or {}