2,875
edits
No edit summary |
No edit summary |
||
Line 1,120: | Line 1,120: | ||
return tostring(root) | return tostring(root) | ||
end | end | ||
function p._buildAstrologyConstellationTable(realmID) | function p._buildAstrologyConstellationTable(realmID) | ||
Line 1,172: | Line 1,171: | ||
-- Header rows | -- Header rows | ||
local | local headerRow1 = tableRoot:tag('tr'):addClass('headerRow-0') | ||
headerRow1:tag('th'):attr('rowspan', 2):wikitext('Constellation') | |||
headerRow1:tag('th'):attr('rowspan', 2):wikitext(Icons.Icon({ "Astrology", type='skill', notext='true' }) .. ' Level') | |||
headerRow1:tag('th'):attr('rowspan', 2):wikitext('XP') | |||
headerRow1:tag('th'):attr('rowspan', 2):wikitext('Skills') | |||
local headerRow2 = tableRoot:tag('tr'):addClass('headerRow-1') | |||
local | |||
for _, modType in ipairs(modTypes) do | for _, modType in ipairs(modTypes) do | ||
if modType.inUse then | if modType.inUse then | ||
headerRow1:tag('th'):attr('colspan', 2):wikitext(modType.name .. ' Stars') | |||
headerRow2:tag('th'):wikitext('Level') | |||
headerRow2:tag('th'):wikitext('Modifiers') | |||
end | end | ||
end | end | ||
Line 1,205: | Line 1,205: | ||
local row = tableRoot:tag('tr') | local row = tableRoot:tag('tr') | ||
if rowIdx == 1 then | if rowIdx == 1 then | ||
row:tag('td'):attr('rowspan', maxRows | row:tag('td'):attr('rowspan', maxRows):wikitext(Icons.Icon({ name, type='constellation', notext=true })) | ||
row:tag('td'):attr('rowspan', maxRows | row:tag('td'):attr('rowspan', maxRows):wikitext(cons.level) | ||
row:tag('td'):attr('rowspan', maxRows):wikitext(cons.baseExperience) | |||
row:tag('td'):attr('rowspan', maxRows | |||
row:tag('td'):attr('rowspan', maxRows):wikitext(table.concat(skillIconArray, '<br/>')) | row:tag('td'):attr('rowspan', maxRows):wikitext(table.concat(skillIconArray, '<br/>')) | ||
else | else | ||
row:tag('td') -- Empty cell to maintain structure | row:tag('td') -- Empty cell to maintain structure | ||
row:tag('td') | row:tag('td') | ||
row:tag('td') | row:tag('td') | ||
Line 1,226: | Line 1,224: | ||
local cell2 = row:tag('td') | local cell2 = row:tag('td') | ||
if masteryLevel ~= nil and rowModData ~= nil then | if masteryLevel ~= nil and rowModData ~= nil then | ||
cell1 | cell1:wikitext(masteryLevel) | ||
cell2:wikitext(Modifiers.getModifiersText(rowModData, false, false, 10)) | cell2:wikitext(Modifiers.getModifiersText(rowModData, false, false, 10)) | ||
else | else | ||
cell1:attr('colspan', 2 | cell1:attr('colspan', 2):wikitext(' ') | ||
end | end | ||
end | end |
edits