Spellbook get list

pull/14/head
4n0n 1 year ago
parent 559c4339a4
commit e8913d3ab8
  1. 13
      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)

Loading…
Cancel
Save