diff --git a/src/SpellBook/SpellBook.lua b/src/SpellBook/SpellBook.lua index c99fc8f..52119b8 100644 --- a/src/SpellBook/SpellBook.lua +++ b/src/SpellBook/SpellBook.lua @@ -27,13 +27,24 @@ end ---@return Spell, ... Spell function SpellBook:GetSpells(...) local spells = {} - for _, id in ipairs({ ... }) do + for _, id in ipairs({...}) do table.insert(spells, self:GetSpell(id)) end return unpack(spells) end +---@param ... number[] +---@return List +function SpellBook:GetList(...) + local spells = {} + for _, id in ipairs({...}) do + table.insert(spells, self:GetSpell(id)) + end + + return Bastion.List:New(spells) +end + ---@param name string ---@return Spell function SpellBook:GetSpellByName(name)