17,101
edits
(Update for v1.1) |
(Fix reference to function) |
||
Line 296: | Line 296: | ||
for i, spellBook in ipairs(Magic.spellBooks) do | for i, spellBook in ipairs(Magic.spellBooks) do | ||
spellTable[spellBook.id] = {} | spellTable[spellBook.id] = {} | ||
local spells = | local spells = Magic.getSpellsBySpellBook(spellBook.id) | ||
for j, spell in ipairs(spells) do | for j, spell in ipairs(spells) do | ||
table.insert(spellTable[spellBook.id], { ["name"] = spell.name, ["order"] = spell.level }) | table.insert(spellTable[spellBook.id], { ["name"] = spell.name, ["order"] = spell.level }) |