diff --git a/src/SpellBook/SpellBook.lua b/src/SpellBook/SpellBook.lua index 52119b8..243a4bd 100644 --- a/src/SpellBook/SpellBook.lua +++ b/src/SpellBook/SpellBook.lua @@ -48,6 +48,10 @@ end ---@param name string ---@return Spell function SpellBook:GetSpellByName(name) + if C_Spell.GetSpellInfo then + local info = C_Spell.GetSpellInfo(name) + return self:GetSpell(info.spellID) + end local _, rank, icon, castTime, minRange, maxRange, spellID, originalIcon = GetSpellInfo(name) return self:GetSpell(spellID) end