Commit 61d46f94 authored by Vildravn's avatar Vildravn
Browse files

Add url to the worldboss stack

parent 6d29f512
......@@ -56,6 +56,16 @@ const textStyles = {
}
}
/*
Shadowlands world boss lookup table
*/
const slBosses = {
Mortanis: 'https://www.wowhead.com/npc=173104/mortanis#drops',
'Nurgash Muckformed': 'https://www.wowhead.com/npc=167526/nurgash-muckformed#drops',
'Oranomonos the Everbranching': 'https://www.wowhead.com/npc=167527/oranomonos-the-everbranching#drops',
'Valinor': 'https://www.wowhead.com/npc=167524/valinor#drops'
}
// -----------------------------
const cheerio = importModule('cheerio');
......@@ -117,7 +127,7 @@ async function createWidget(size) {
await buildAffixDisplay(rightColumn, data);
rightColumn.addSpacer(20);
data = await parseTextGroup(`#${REGION}-group-epiceliteworldsl`, `.tiw-region[data-region="${REGION}"]`);
await buildTextDisplay(rightColumn, "world boss", data);
await buildTextDisplay(rightColumn, "world boss", data, slBosses[data[0]]);
$ = undefined;
delete($);
......@@ -141,9 +151,10 @@ async function buildAffixDisplay(parent, affixes) {
await buildImageDisplay(parent, "mythic+ affixes", affixes);
}
async function buildTextDisplay(parent, heading, data) {
async function buildTextDisplay(parent, heading, data, url) {
const contentStack = parent.addStack();
contentStack.layoutVertically();
contentStack.url = url;
const header = contentStack.addText(heading.toUpperCase());
header.textColor = textStyles.header.color;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment