Skip to content
Merged

Deploy #1791

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 @@ -78,6 +78,7 @@
// Midnight S2 added new IDs for some reason
248: 'World Activity',
249: 'Delve',
251: 'Hard Prey',
258: 'Purging the Vaults',
};

Expand Down
1 change: 1 addition & 0 deletions apps/frontend/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export abstract class Constants {
static readonly charactersPerAccount: number = 70;
static readonly expansion: number = 11;
static readonly guildBankTabItems = 98;
static readonly lockoutDifficultyMultiplier = 1_000_000;
static readonly maxRenown: number = 80;
static readonly restedDuration: number = 10 * 24 * 60 * 60; // 10 days

Expand Down
1 change: 1 addition & 0 deletions apps/frontend/data/tasks/11-midnight/12-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const vaultDailies = [
96641, // Relentless Strikes
96642, // Decisive Incursions
96643, // From Whence it Came
96644, // Essence of Malice
98419, // Shoulder to Shoulder
98420, // What's Out There?
];
Expand Down
5 changes: 4 additions & 1 deletion apps/frontend/shared/utils/view-has-lockout.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { Constants } from '@/data/constants';
import type { SettingsView } from '@/shared/stores/settings/types';
import type { DifficultyData } from '@/types';

export function viewHasLockout(view: SettingsView, difficulty: DifficultyData, instanceId: number) {
return (
view.homeLockouts.includes(instanceId) ||
view.homeLockouts.includes((difficulty?.id || 0) * 10000000 + instanceId)
view.homeLockouts.includes(
(difficulty?.id || 0) * Constants.lockoutDifficultyMultiplier + instanceId
)
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import sortBy from 'lodash/sortBy';

import { Constants } from '@/data/constants';
import { difficultyMap, journalDifficultyOrder } from '@/data/difficulty';
import { ignoredLockoutInstances } from '@/data/dungeon';
import { expansionMap } from '@/data/expansion';
Expand Down Expand Up @@ -54,7 +55,7 @@
) {
const difficultyName = difficultyMap[difficulty].shortName;
ret.push({
id: `${difficulty * 10000000 + instance.id}`,
id: `${difficulty * Constants.lockoutDifficultyMultiplier + instance.id}`,
name: `[${expansionName}] [${difficultyName}] ${instance.name}`,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
};
</script>

<Sidebar baseUrl="/sets" items={categories} scrollable={true} width="16rem" {percentFunc}>
<Sidebar baseUrl="/sets" items={categories} scrollable={true} width="18rem" {percentFunc}>
<svelte:fragment slot="before">
<div>
<ProgressBar title="Overall" have={overall.have} total={overall.total} />
Expand Down
9 changes: 6 additions & 3 deletions apps/frontend/user-home/state/user/general.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import sortBy from 'lodash/sortBy';
import uniq from 'lodash/uniq';
import { SvelteMap, SvelteSet } from 'svelte/reactivity';

import { Constants } from '@/data/constants';
import {
difficultyMap,
lockoutDifficultyOrder,
Expand Down Expand Up @@ -406,9 +407,11 @@ export class DataUserGeneral {
}

if (!found) {
if (instanceId >= 10000000) {
const actualDifficulty = Math.floor(instanceId / 10000000);
const actualInstanceId = instanceId % 10000000;
if (instanceId >= Constants.lockoutDifficultyMultiplier) {
const actualDifficulty = Math.floor(
instanceId / Constants.lockoutDifficultyMultiplier
);
const actualInstanceId = instanceId % Constants.lockoutDifficultyMultiplier;
homeLockouts.push({
difficulty: difficultyMap[actualDifficulty],
instanceId: actualInstanceId,
Expand Down
Loading