393
edits
No edit summary |
No edit summary |
||
Line 44: | Line 44: | ||
if not skillName then | if not skillName then | ||
return "Invalid skillName" | |||
end | |||
local skillNodes = p. | local skillNodes = p.getSkillTree(skillName) | ||
if not skillNodes then | if not skillNodes then | ||
Line 59: | Line 59: | ||
:addClass('skill-tree-node') | :addClass('skill-tree-node') | ||
:tag('h4'):wikitext(node.name):done() | :tag('h4'):wikitext(node.name):done() | ||
:tag('p'):wikitext('Points: ' .. node.costs | :tag('p'):wikitext('Points: ' .. node.costs):done() | ||
if node.modifiers then | if node.modifiers then | ||
local modifierList = nodeDiv:tag('ul') | local modifierList = nodeDiv:tag('ul') | ||
for modifier, data in pairs(node.modifiers) do | for modifier, data in pairs(node.modifiers) do | ||
modifierList:tag('li') | if type(data) == "table" then | ||
modifierList:tag('li') | |||
:done() | :wikitext(modifier .. ': Skill: ' .. (data.skillID or "N/A") .. | ||
', Realm: ' .. (data.realmID or "N/A") .. | |||
', Value: ' .. (data.value or "N/A")) | |||
:done() | |||
else | |||
modifierList:tag('li') | |||
:wikitext(modifier .. ': ' .. tostring(data)) | |||
:done() | |||
end | |||
end | end | ||
modifierList:done() | modifierList:done() | ||
Line 76: | Line 84: | ||
return tostring(html) | return tostring(html) | ||
end | end | ||
return p | return p |
edits