libspell: skip spell index of invalid spells

This commit is contained in:
shagu
2025-06-01 14:45:32 +02:00
parent 02b44c1e61
commit 3d96b0ffff
+1
View File
@@ -44,6 +44,7 @@ end
-- return: [number],[string] spell index and spellbook id
local spellindex = {}
function libspell.GetSpellIndex(name, rank)
if not name then return end
local cache = spellindex[name..(rank or "")]
if cache then return cache[1], cache[2] end