17,101
edits
(_getSpellTemplateData: Fix for AoD spells which produce bone items) |
(_getSpellTable: Sort rows by level requirement) |
||
Line 652: | Line 652: | ||
end | end | ||
local spellListSorted = Shared.shallowClone(spellList) | |||
table.sort(spellListSorted, function(a, b) return a.level < b.level end) | |||
local resultPart = {p._getSpellHeader(includeSpellbook, includeItems, includeDamage, includeExperience)} | local resultPart = {p._getSpellHeader(includeSpellbook, includeItems, includeDamage, includeExperience)} | ||
for i, spell in ipairs( | for i, spell in ipairs(spellListSorted) do | ||
table.insert(resultPart, p._getSpellRow(spell, includeSpellbook, includeItems, includeDamage, includeExperience)) | table.insert(resultPart, p._getSpellRow(spell, includeSpellbook, includeItems, includeDamage, includeExperience)) | ||
end | end |