17,101
edits
(_getSpellRow: Prevent attack interval display when attack only has a single hit) |
(Add TotH icon to tables) |
||
Line 89: | Line 89: | ||
end | end | ||
end | end | ||
end | |||
--Returns the expansion icon for the spell if it has one | |||
function p.getExpansionIcon(frame) | |||
local spellName = frame.args ~= nil and frame.args[1] or frame | |||
local spell = p.getSpell(spellName) | |||
if spell == nil then | |||
return "ERROR: No spell named " .. spellName .. " exists in the data module[[Category:Pages with script errors]]" | |||
end | |||
return Icons.getExpansionIcon(spell.id) | |||
end | end | ||
Line 550: | Line 561: | ||
local rowPart = {'\r\n|-\r\n|data-sort-value="' .. spell.name .. '"| '} | local rowPart = {'\r\n|-\r\n|data-sort-value="' .. spell.name .. '"| '} | ||
table.insert(rowPart, Icons.Icon({spell.name, type=spellBook.imgType, notext=true, size=50})) | table.insert(rowPart, Icons.Icon({spell.name, type=spellBook.imgType, notext=true, size=50})) | ||
table.insert(rowPart, '|| ' .. Icons.Icon({spell.name, type=spellBook.imgType, noicon=true})) | table.insert(rowPart, '|| ' .. Icons.getExpansionIcon(spell.id) .. Icons.Icon({spell.name, type=spellBook.imgType, noicon=true})) | ||
table.insert(rowPart, '||data-sort-value="' .. spell.level .. '"| ' .. p._getSpellRequirements(spell)) | table.insert(rowPart, '||data-sort-value="' .. spell.level .. '"| ' .. p._getSpellRequirements(spell)) | ||