2,875
edits
No edit summary |
No edit summary |
||
Line 444: | Line 444: | ||
local skillID = 'Fishing' | local skillID = 'Fishing' | ||
local | local html = mw.html.create('table') | ||
html:addClass('wikitable sortable stickyHeader') | |||
local fishAreas = GameData.getEntities(SkillData.Fishing.areas, | -- Add header row | ||
local headerRow = html:tag('tr'):addClass('headerRow-0') | |||
headerRow:tag('th'):wikitext('Name') | |||
headerRow:tag('th'):wikitext('Fish') | |||
headerRow:tag('th'):wikitext('[[DLC]]') | |||
headerRow:tag('th'):wikitext('Fish Chance') | |||
headerRow:tag('th'):wikitext('Junk Chance') | |||
headerRow:tag('th'):wikitext('Special Chance') | |||
-- Get fishing areas | |||
local fishAreas = GameData.getEntities(SkillData.Fishing.areas, function(obj) | |||
return Skills.getRecipeRealm(obj) == realm.id | |||
end) | |||
-- Add rows for each fishing area | |||
for i, area in ipairs(fishAreas) do | for i, area in ipairs(fishAreas) do | ||
local row = html:tag('tr') | |||
row:tag('td') | |||
:css('text-align', 'left') | |||
:wikitext(Icons.getDLCColumnIcon(area.id) .. area.name) | |||
local fishArray = {} | local fishArray = {} | ||
Line 466: | Line 475: | ||
end | end | ||
end | end | ||
row:tag('td') | |||
:wikitext(table.concat(fishArray, '<br/>')) | |||
row:tag('td') | |||
:css('text-align', 'center') | |||
:wikitext(Icons.getDLCColumnIcon(area.id)) | |||
:attr('data-sort-value', Icons.getExpansionID(area.id)) | |||
row:tag('td') | |||
:css('text-align', 'right') | |||
:wikitext(area.fishChance .. '%') | |||
row:tag('td') | |||
:css('text-align', 'right') | |||
:wikitext(area.junkChance .. '%') | |||
row:tag('td') | |||
:css('text-align', 'right') | |||
:wikitext(area.specialChance .. '%') | |||
end | end | ||
return tostring(html) | |||
return | |||
end | end | ||
function p.getThievingGeneralRareTable(frame) | function p.getThievingGeneralRareTable(frame) |
edits