2,875
edits
Tag: Undo |
Tag: Undo |
||
Line 72: | Line 72: | ||
end | end | ||
function p.getSpell(name, spellType | function p.getSpell(name, spellType) | ||
return p.getSpellByProperty(Shared.fixPagename(name), 'name', spellType | return p.getSpellByProperty(Shared.fixPagename(name), 'name', spellType) | ||
end | end | ||
Line 109: | Line 109: | ||
function p.getExpansionIcon(frame) | function p.getExpansionIcon(frame) | ||
local spellName = frame.args ~= nil and frame.args[1] or frame | local spellName = frame.args ~= nil and frame.args[1] or frame | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | ||
Line 130: | Line 129: | ||
function p.getSpellIconType(frame) | function p.getSpellIconType(frame) | ||
local spellName = frame.args ~= nil and frame.args[1] or frame | local spellName = frame.args ~= nil and frame.args[1] or frame | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return 'spell' | return 'spell' | ||
Line 225: | Line 223: | ||
function p.getSpellItems(frame) | function p.getSpellItems(frame) | ||
local spellName = frame.args ~= nil and frame.args[1] or frame | local spellName = frame.args ~= nil and frame.args[1] or frame | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | ||
Line 248: | Line 245: | ||
function p.getSpellRunes(frame) | function p.getSpellRunes(frame) | ||
local spellName = frame.args ~= nil and frame.args[1] or frame | local spellName = frame.args ~= nil and frame.args[1] or frame | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | ||
Line 367: | Line 363: | ||
local spellName = frame.args ~= nil and frame.args[1] or frame[1] | local spellName = frame.args ~= nil and frame.args[1] or frame[1] | ||
local statName = frame.args ~= nil and frame.args[2] or frame[2] | local statName = frame.args ~= nil and frame.args[2] or frame[2] | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | ||
Line 377: | Line 372: | ||
function p.getOtherSpellBoxText(frame) | function p.getOtherSpellBoxText(frame) | ||
local spellName = frame.args ~= nil and frame.args[1] or frame | local spellName = frame.args ~= nil and frame.args[1] or frame | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | ||
Line 409: | Line 403: | ||
function p.getSpellCategories(frame) | function p.getSpellCategories(frame) | ||
local spellName = frame.args ~= nil and frame.args[1] or frame | local spellName = frame.args ~= nil and frame.args[1] or frame | ||
local spell = p.getSpell(spellName) | |||
local spell = p.getSpell(spellName | |||
if spell == nil then | if spell == nil then | ||
return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') | return Shared.printError('No spell named "' .. spellName .. '" exists in the data module') |
edits