17,101
edits
(formatRuneList: Fix quantity reference) |
(Change spellbook -> spellBook to match game data) |
||
Line 102: | Line 102: | ||
function p._getSpellIconType(spell) | function p._getSpellIconType(spell) | ||
local spellBook = GameData.getEntityByID(p.spellBooks, spell. | local spellBook = GameData.getEntityByID(p.spellBooks, spell.spellBook) | ||
if spellBook == nil then | if spellBook == nil then | ||
-- Pick a suitable default | -- Pick a suitable default | ||
Line 184: | Line 184: | ||
function p._getSpellTemplateData(spell) | function p._getSpellTemplateData(spell) | ||
local templateData = nil | local templateData = nil | ||
if spell. | if spell.spellBook == 'altMagic' then | ||
if spell.produces ~= nil then | if spell.produces ~= nil then | ||
-- Item produced varies depending on items consumed | -- Item produced varies depending on items consumed | ||
Line 242: | Line 242: | ||
end | end | ||
return table.concat(resultPart, '<br/>') | return table.concat(resultPart, '<br/>') | ||
elseif spell. | elseif spell.spellBook == 'standard' then | ||
return 'Combat spell with a max hit of ' .. Shared.formatnum(spell.maxHit * 10) | return 'Combat spell with a max hit of ' .. Shared.formatnum(spell.maxHit * 10) | ||
else | else | ||
Line 261: | Line 261: | ||
return p._getSpellRunes(spell) | return p._getSpellRunes(spell) | ||
elseif stat == 'type' then | elseif stat == 'type' then | ||
return p.getTypeString(spell. | return p.getTypeString(spell.spellBook) | ||
end | end | ||
return spell[stat] | return spell[stat] | ||
Line 293: | Line 293: | ||
function p._getSpellCategories(spell) | function p._getSpellCategories(spell) | ||
local result = '[[Category:Spells]]' | local result = '[[Category:Spells]]' | ||
result = result..'[[Category:'..p.getTypeString(spell. | result = result..'[[Category:'..p.getTypeString(spell.spellBook)..']]' | ||
return result | return result | ||
end | end |