Skip to content
Merged

Deploy #1788

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</style>

{#if dungeon !== undefined}
<th data-tooltip={dungeon.getTooltip()}>
<th data-tooltip={dungeon.name}>
<WowthingImage name={dungeon.icon} size={48} />
<span class="text-overlay">{dungeon.abbreviation}</span>
</th>
Expand Down
28 changes: 14 additions & 14 deletions apps/frontend/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export abstract class Constants {
static readonly maxRenown: number = 80;
static readonly restedDuration: number = 10 * 24 * 60 * 60; // 10 days

static readonly mythicPlusSeason: number = 17;
static readonly mythicPlusSeason: number = 18;

static readonly defaultUnixTime = 946684800;
static readonly defaultTime = DateTime.fromSeconds(Constants.defaultUnixTime);
Expand Down Expand Up @@ -44,26 +44,26 @@ export abstract class Constants {
midnightSilvermoon: 2710,
};

// static JSON -> itemBonusListGroups -> match upgradeTiers IDs
// item JSON -> itemBonusListGroups -> match upgradeTiers IDs
static readonly seasonItemBonusListGroups = new Set<number>([
607,
608,
609,
610,
611,
612, // first set
// 607,
// 608,
// 609,
// 610,
// 611,
// 612, // first set
613,
614,
615,
616,
617,
618, // second set
619,
626,
627,
628,
629,
630, // third set
// 619,
// 626,
// 627,
// 628,
// 629,
// 630, // third set
]);

static readonly upgradeTiers = {
Expand Down
64 changes: 59 additions & 5 deletions apps/frontend/data/dungeon.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Dungeon } from '@/types';
import type { StaticDataInstance } from '@/shared/stores/static/types';
import { convertibleCategories } from '@/components/items/convertible/data';
import { MapChallengeMode } from '@/enums/map-challenge-mode';

// MapChallengeMode.db2
export const dungeons: Dungeon[] = [
// Wrath of the Lich King
new Dungeon(556, 'Pit of Saron', 'PIT', '', 1860 / 60),
new Dungeon(556, 'Pit of Saron', 'PIT', 'achievement/61271', 1860 / 60),

// Cataclysm
new Dungeon(438, 'The Vortex Pinnacle', 'VP', 'achievement/4847', 1800 / 60),
Expand Down Expand Up @@ -115,10 +116,63 @@ export const dungeons: Dungeon[] = [
new Dungeon(542, "Eco-Dome Al'dani", 'EDA', 'achievement/42782', 1860 / 60),

// Midnight
new Dungeon(557, 'Windrunner Spire', 'WS', 'achievement/41288', 2010 / 60),
new Dungeon(558, "Magister's Terrace", 'MT', 'achievement/61213', 2010 / 60),
new Dungeon(559, 'Nexus-Point Xenas', 'NPX', 'achievement/61646', 1770 / 60),
new Dungeon(560, 'Maisara Caverns', 'MC', 'achievement/61644', 1980 / 60),
new Dungeon(
MapChallengeMode.AltarOfFangs,
'Altar of Fangs',
'AoF',
'achievement/62284',
1800 / 60
),
new Dungeon(
MapChallengeMode.DenOfNalorakk,
'Den of Nalorakk',
'DoN',
'achievement/61643',
1920 / 60
),
new Dungeon(
MapChallengeMode.MagistersTerrace,
"Magister's Terrace",
'MT',
'achievement/61213',
2010 / 60
),
new Dungeon(
MapChallengeMode.MaisaraCaverns,
'Maisara Caverns',
'MC',
'achievement/61644',
1980 / 60
),
new Dungeon(MapChallengeMode.MurderRow, 'Murder Row', 'MR', 'achievement/41962', 2040 / 60),
new Dungeon(
MapChallengeMode.NexusPointXenas,
'Nexus-Point Xenas',
'NPX',
'achievement/61646',
1770 / 60
),
new Dungeon(
MapChallengeMode.TheBlindingVale,
'The Blinding Vale',
'TBV',
'achievement/61649',
1800 / 60
),
new Dungeon(
MapChallengeMode.VoidscarArena,
'Voidscar Arena',
'VA',
'achievement/61510',
1800 / 60
),
new Dungeon(
MapChallengeMode.WindrunnerSpire,
'Windrunner Spire',
'WS',
'achievement/41288',
2010 / 60
),
];

export const dungeonMap: Record<number, Dungeon> = Object.fromEntries(
Expand Down
38 changes: 30 additions & 8 deletions apps/frontend/data/mythic-plus.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MapChallengeMode } from '@/enums/map-challenge-mode';
import { MythicPlusScoreType } from '@/enums/mythic-plus-score-type';
import { MythicPlusSeason } from '@/types';

Expand Down Expand Up @@ -126,14 +127,25 @@ const orderWarWithinS3: number[] = [
];

const orderMidnightS1: number[] = [
558, // Magister's Terrace
560, // Maisara Caverns
559, // Nexus-Point Xenas
557, // Windrunner Spire
402, // Algeth'ar Academy [DF]
239, // Seat (other seat?) [Legion]
161, // Skyreach [WoD]
556, // Pit of Saron [WotLK]
MapChallengeMode.MagistersTerrace,
MapChallengeMode.MaisaraCaverns,
MapChallengeMode.NexusPointXenas,
MapChallengeMode.WindrunnerSpire,
MapChallengeMode.AlgetharAcademy, // DF
MapChallengeMode.SeatOfTheTriumvirate, // Legion
MapChallengeMode.Skyreach, // WoD
MapChallengeMode.PitOfSaron, // WotLK
];

const orderMidnightS2: number[] = [
MapChallengeMode.AltarOfFangs,
MapChallengeMode.DenOfNalorakk,
MapChallengeMode.MurderRow,
MapChallengeMode.TheBlindingVale,
MapChallengeMode.VoidscarArena,
MapChallengeMode.RubyLifePools, // DF
MapChallengeMode.KingsRest, // BfA
MapChallengeMode.TempleOfSethraliss, // BfA
];

const orderRemixLegion: number[] = [
Expand All @@ -154,6 +166,16 @@ const orderRemixLegion: number[] = [

export const seasonMap: Record<number, MythicPlusSeason> = Object.fromEntries(
[
new MythicPlusSeason({
id: 18,
name: '[Mid] Season 2',
slug: 'midnight-2',
minLevel: 90,
orders: [orderMidnightS2],
portalLevel: 10,
scoreType: MythicPlusScoreType.WarWithin,
startPeriod: 1077, // 2026-08-19
}),
new MythicPlusSeason({
id: 17,
name: '[Mid] Season 1',
Expand Down
21 changes: 13 additions & 8 deletions apps/frontend/data/tasks/11-midnight/12-0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ const specialAssignmentUnlockToQuest: Record<number, number> = {
94391: 93013, // Special Assignment: Push Back the Light
94795: 93244, // Special Assignment: Agents of the Shield
94743: 93438, // Special Assignment: Precision Excision

// Coiled Isle
96492: 95921, // Special Assignment: Demand and Supply
96029: 95922, // Special Assignment: Face the Swarm
96307: 95918, // Special Assignment: Wraith Wrath
};

const specialAssignmentQuestToUnlock: Record<number, number> = Object.fromEntries(
Object.entries(specialAssignmentUnlockToQuest).map(([k, v]) => [v, parseInt(k)])
);

const specialAssignmentFunc = (index: number, isQuest: boolean) => {
export const specialAssignmentFunc = (unlocks: number[], index: number, isQuest: boolean) => {
return (char: Character, chore: Chore) => {
const now = timeState.slowTime;
const allWorldQuests = dynamicDataStore.getCachedQuests(char.region);
Expand All @@ -42,7 +47,7 @@ const specialAssignmentFunc = (index: number, isQuest: boolean) => {
.map((worldQuest, index) => [worldQuest.questId, index])
);

const activeQuests = specialAssignmentUnlocks
const activeQuests = unlocks
.filter((questId) => questIdIndexes[questId])
.map((questId) => [questIdIndexes[questId], questId]);
activeQuests.sort((a, b) => a[0] - b[0]);
Expand All @@ -54,12 +59,12 @@ const specialAssignmentFunc = (index: number, isQuest: boolean) => {
: activeQuests[index][1],
];
} else {
return specialAssignmentUnlocks;
return unlocks;
}
};
};

const specialAssignmentExpiry: Chore['customExpiryFunc'] = (char, scannedAt, questIds) => {
export const specialAssignmentExpiry: Chore['customExpiryFunc'] = (char, scannedAt, questIds) => {
const allWorldQuests = dynamicDataStore.getCachedQuests(char.region);
const findQuestId = specialAssignmentQuestToUnlock[questIds[0]] || questIds[0];
const worldQuest = allWorldQuests.find((wq) => wq.questId === findQuestId);
Expand Down Expand Up @@ -170,15 +175,15 @@ export const midChores12_0: Task = {
name: 'World Quests',
alwaysStarted: true,
overrideNeed: 3,
questIds: specialAssignmentFunc(0, false),
questIds: specialAssignmentFunc(specialAssignmentUnlocks, 0, false),
customExpiryFunc: specialAssignmentExpiry,
},
{
key: 'assignment',
name: 'Assignment',
alwaysStarted: true,
showQuestName: true,
questIds: specialAssignmentFunc(0, true),
questIds: specialAssignmentFunc(specialAssignmentUnlocks, 0, true),
customExpiryFunc: specialAssignmentExpiry,
},
],
Expand All @@ -196,15 +201,15 @@ export const midChores12_0: Task = {
name: 'World Quests',
alwaysStarted: true,
overrideNeed: 3,
questIds: specialAssignmentFunc(1, false),
questIds: specialAssignmentFunc(specialAssignmentUnlocks, 1, false),
customExpiryFunc: specialAssignmentExpiry,
},
{
key: 'assignment',
name: 'Assignment',
alwaysStarted: true,
showQuestName: true,
questIds: specialAssignmentFunc(1, true),
questIds: specialAssignmentFunc(specialAssignmentUnlocks, 1, true),
customExpiryFunc: specialAssignmentExpiry,
},
],
Expand Down
39 changes: 38 additions & 1 deletion apps/frontend/data/tasks/11-midnight/12-1.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
import { iconLibrary } from '@/shared/icons';
import { DbResetType } from '@/shared/stores/db/enums';
import type { Chore, Task } from '@/types/tasks';

import { specialAssignmentExpiry, specialAssignmentFunc } from './12-0';

const specialAssignmentUnlocks = [
96492, // Special Assignment: Demand and Supply
96029, // Special Assignment: Face the Swarm
96307, // Special Assignment: Wraith Wrath
];

export const midChores12_1: Task = {
key: 'midChores12_1',
name: '[Mid] 12.1.x',
shortName: '12.1',
showSeparate: true,
chores: [],
chores: [
{
key: 'midSpecial1',
name: 'Special Assignment 1',
icon: iconLibrary.mdiNumeric1CircleOutline,
showQuestName: true,
questReset: DbResetType.Custom,
customExpiryFunc: specialAssignmentExpiry,
subChores: [
{
key: 'unlock',
name: 'World Quests',
alwaysStarted: true,
overrideNeed: 3,
questIds: specialAssignmentFunc(specialAssignmentUnlocks, 0, false),
customExpiryFunc: specialAssignmentExpiry,
},
{
key: 'assignment',
name: 'Assignment',
alwaysStarted: true,
showQuestName: true,
questIds: specialAssignmentFunc(specialAssignmentUnlocks, 0, true),
customExpiryFunc: specialAssignmentExpiry,
},
],
},
],
};
54 changes: 54 additions & 0 deletions apps/frontend/enums/map-challenge-mode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
export enum MapChallengeMode {
// ?
TheStonevault = 501,

// WotLK
PitOfSaron = 556,

// Cataclysm
GrimBatol = 507,
TheStonecore = 541,

// Warlords of Draenor
Skyreach = 161,

// Legion
SeatOfTheTriumvirate = 239,

// Battle for Azeroth
KingsRest = 249,
TempleOfSethraliss = 250,

// Dragonflight
AlgetharAcademy = 402,
BrackenhideHollow = 405,
DawnOfTheInfiniteGalakrondsFall = 463,
DawnOfTheInfiniteMurozondsRise = 464,
HallsOfInfusion = 406,
Neltharus = 404,
RubyLifePools = 399,
TheAzureVault = 401,
TheNokhudOffensive = 400,

// The War Within
AraKara = 503,
CinderbrewMeadery = 506,
CityOfThreads = 502,
DarkflameCleft = 504,
EcoDomeAldani = 542,
OperationFloodgate = 525,
PrioryOfTheSacredFlame = 499,
TheDawnbreaker = 505,
TheRookery = 500,

// Midnight
AltarOfFangs = 588,
DenOfNalorakk = 586,
MagistersTerrace = 558,
MaisaraCaverns = 560,
MurderRow = 587,
NexusPointXenas = 559,
TheBlindingVale = 584,
VoidscarArena = 585,
WindrunnerSpire = 557,
}
6 changes: 0 additions & 6 deletions apps/frontend/types/dungeon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ export class Dungeon {
this.timer3 = this.timer1 * 0.6;
}

getTooltip(): TippyProps {
return {
content: `${this.name}`,
};
}

getTimed(ms: number): DungeonTimedResult {
if (ms < this.timer3) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
// Hacky, ugh
categoryIds.push(
...categoryChildren[categoryId]
.filter((c) => !!c)
.map((c) => c.id)
.filter((c) => [125001, 125011, 125012].indexOf(c) === -1)
);
Expand Down
Loading