Skip to content
8 changes: 5 additions & 3 deletions apps/frontend/components/home/table/paragon/Tooltip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
getNumberKeyedEntries(
groupBy(
getNumberKeyedEntries(paragonQuests),
([repId]) => wowthingData.static.reputationById.get(repId)?.expansion || 0
([repId]) =>
wowthingData.static.reputationByParagonId.get(repId)?.expansion || 0
)
).map(([expansion, reputations]) => [
expansion,
sortBy(
reputations,
([repId]) => wowthingData.static.reputationById.get(repId)?.name || 'ZZZ'
([repId]) => wowthingData.static.reputationByParagonId.get(repId)?.name || 'ZZZ'
),
]),
([expansion]) => expansion
Expand Down Expand Up @@ -54,7 +55,8 @@
<table class="table table-striped">
<tbody>
{#each reputations as [reputationId, characterIds]}
{@const reputation = wowthingData.static.reputationById.get(reputationId)}
{@const reputation =
wowthingData.static.reputationByParagonId.get(reputationId)}
{@const characters = sortBy(
characterIds
.map((id) => userState.general.characterById[id])
Expand Down
9 changes: 5 additions & 4 deletions apps/frontend/components/items/convertible/data.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ItemLevels } from '@/data/constants';
import { AppearanceModifier } from '@/enums/appearance-modifier';
import { ArmorType } from '@/enums/armor-type';
import { InventoryType } from '@/enums/inventory-type';
Expand Down Expand Up @@ -53,22 +54,22 @@ export const convertibleCategories: ConvertibleCategory[] = [
conversionCurrencyId: 3465, // Venomblight Manaflux
tiers: [
{
itemLevel: 318,
itemLevel: ItemLevels.Myth[1],
highUpgrade: currentUpgrade4,
lowUpgrade: currentUpgrade3,
},
{
itemLevel: 305,
itemLevel: ItemLevels.Hero[1],
highUpgrade: currentUpgrade3,
lowUpgrade: currentUpgrade2,
},
{
itemLevel: 292,
itemLevel: ItemLevels.Champion[1],
highUpgrade: currentUpgrade2,
lowUpgrade: currentUpgrade1,
},
{
itemLevel: 279,
itemLevel: ItemLevels.Veteran[1],
highUpgrade: currentUpgrade1,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@
import { Constants } from '@/data/constants';
import { wowthingData } from '@/shared/stores/data';
import { toNiceNumber } from '@/utils/formatting';
import type {
StaticDataReputation,
StaticDataReputationTier,
} from '@/shared/stores/static/types';
import type { StaticDataReputation } from '@/shared/stores/static/types';
import type { Character, CharacterReputationParagon } from '@/types';
import type { ManualDataReputationSet } from '@/types/data/manual';
import { brannHack, nazjatarHack, valeeraHack } from './hacks';

import RenownTooltip from './TooltipReputationRenown.svelte';
import WowthingImage from '@/shared/components/images/sources/WowthingImage.svelte';

export let bottom: string = undefined;
export let character: Character = undefined;
export let characterRep: number;
export let dataRep: StaticDataReputation;
export let paragon: CharacterReputationParagon = undefined;
export let reputation: ManualDataReputationSet = undefined;

let reps: {
cls: string;
maxValue: number;
minValue: number;
name: string;
thisOne: boolean;
}[];

$: {
const tiers: StaticDataReputationTier =
wowthingData.static.reputationTierById.get(dataRep.tierId) ||
wowthingData.static.reputationTierById.get(0);

reps = [];
type Props = {
characterRep: number;
dataRep: StaticDataReputation;
bottom?: string;
character?: Character;
paragon?: CharacterReputationParagon;
reputation?: ManualDataReputationSet;
};
let { characterRep, dataRep, bottom, character, paragon, reputation }: Props = $props();

let tiers = $derived(
wowthingData.static.reputationTierById.get(dataRep.tierId) ||
wowthingData.static.reputationTierById.get(0)
);

let reps = $derived.by(() => {
const ret: {
cls: string;
maxValue: number;
minValue: number;
name: string;
thisOne: boolean;
}[] = [];

let foundIndex = -1;
for (let i = 0; i < tiers.names.length; i++) {
let minValue = tiers.minValues[i];
Expand Down Expand Up @@ -73,7 +73,7 @@
}
}

reps.push({
ret.push({
cls: 'quality0',
maxValue,
minValue,
Expand All @@ -83,52 +83,54 @@
}

// Apply quality colours to the bottom 5 tiers
const start = Math.max(0, reps.length - 1);
const start = Math.max(0, ret.length - 1);
const setClass = Math.max(0, start - 5);
let seenThisOne = false;
let badCount = 0;
for (let i = start; i >= 0; i--) {
if (reps[i].maxValue <= 0) {
reps[i].cls = ['status-shrug', 'status-warn', 'status-fail'][Math.min(2, badCount)];
if (ret[i].maxValue <= 0) {
ret[i].cls = ['status-shrug', 'status-warn', 'status-fail'][Math.min(2, badCount)];
badCount++;
} else if (
dataRep.id === Constants.reputations.delveBrann ||
dataRep.id === Constants.reputations.delveValeera ||
Constants.reputations.nazjatarFriends.includes(dataRep.id)
) {
const levelMatch = reps[i].name.match(/ (\d{1,3})/);
const levelMatch = ret[i].name.match(/ (\d{1,3})/);
if (levelMatch) {
if (dataRep.id === Constants.reputations.delveBrann) {
reps[i].cls = `reputation${brannHack(levelMatch[1])}`;
ret[i].cls = `reputation${brannHack(levelMatch[1])}`;
} else if (dataRep.id === Constants.reputations.delveValeera) {
reps[i].cls = `reputation${valeeraHack(levelMatch[1])}`;
ret[i].cls = `reputation${valeeraHack(levelMatch[1])}`;
} else {
reps[i].cls = `reputation${nazjatarHack(reps[i].name)}`;
ret[i].cls = `reputation${nazjatarHack(ret[i].name)}`;
}
}
} else if (i >= setClass) {
reps[i].cls = `reputation${start - i + 1}`;
ret[i].cls = `reputation${start - i + 1}`;
}

if (reps[i].thisOne) {
if (ret[i].thisOne) {
if (!seenThisOne) {
seenThisOne = true;
} else {
reps[i].thisOne = false;
ret[i].thisOne = false;
}
}
}

if (paragon) {
reps.push({
ret.push({
cls: 'quality6',
maxValue: 10000,
minValue: 0,
name: 'Paragon',
thisOne: false,
});
}
}

return ret;
});
</script>

<style lang="scss">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,22 @@
</script>

<style lang="scss">
.wowthing-tooltip {
max-width: 22rem;
}
.flex-wrapper {
align-items: flex-start;
gap: 1rem;
}
table {
border-bottom: 1px solid var(--border-color);
margin-bottom: -1px;
}
.slot {
--width: 5rem;
--width: 5.5rem;

text-align: left;
white-space: nowrap;
}
.item-level {
--max-width: 4rem;
Expand Down Expand Up @@ -126,7 +131,7 @@
{#if maxCharges}
<div class="bottom">
<div>
{haveCharges} / {maxCharges} charges
{haveCharges} / {maxCharges} catalyst charges
</div>
</div>
{/if}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import sortBy from 'lodash/sortBy';

import { keyVaultItemLevel } from '@/data/vault';
import { dungeonVaultItemLevel } from '@/data/vault';
import { timeStore } from '@/shared/stores/time';
import { userStore } from '@/stores';
import { getVaultQualityByItemLevel } from '@/utils/mythic-plus';
Expand All @@ -26,7 +26,7 @@
);

const firstLevel = getDungeonLevel(progress[0]);
const betterOptions = keyVaultItemLevel.filter(([level]) => level > firstLevel);
const betterOptions = dungeonVaultItemLevel.filter(([level]) => level > firstLevel);
improve = [];
for (let i = betterOptions.length - 1; i >= 0; i--) {
const [keyLevel] = betterOptions[i];
Expand Down
43 changes: 43 additions & 0 deletions apps/frontend/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,49 @@ export abstract class Constants {
};
}

export abstract class ItemLevels {
static readonly Adventurer = {
1: 266,
2: 269,
3: 272,
4: 276,
5: 279,
6: 282,
};
static readonly Veteran = {
1: 279,
2: 282,
3: 285,
4: 289,
5: 292,
6: 295,
};
static readonly Champion = {
1: 292,
2: 295,
3: 298,
4: 302,
5: 305,
6: 308,
};
static readonly Hero = {
1: 305,
2: 308,
3: 311,
4: 315,
5: 318,
6: 321,
};
static readonly Myth = {
1: 318,
2: 321,
3: 324,
4: 328,
5: 331,
6: 334,
};
}

export abstract class Strings {
static readonly doUnlockQuests = 'Do unlock quests!';
}
1 change: 1 addition & 0 deletions apps/frontend/data/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ export const currencyItems: Record<number, number[]> = {
],
// Miscellaneous > Decor
100104: [
269010, // Essence of Lumber
245586, // Ironwood Lumber [Classic]
242691, // Olemba Lumber [TBC]
251762, // Coldwind Lumber [WotLK]
Expand Down
12 changes: 6 additions & 6 deletions apps/frontend/data/delve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ export const delveMap: Record<number, Delve> = {
name: 'The Ring of Glory',
shortName: 'RG',
storyRanks: {
"Minchi's Osseous Adventure": 3,
'Olds and Ends': 3,
'Speaking Their Language': 3,
'Adopt-a-thon': 1, // killing the boss twice??
'Game Day': 3,
'Open Night': 3,
},
},
8763: {
name: 'Gnarldor Isle',
shortName: 'GI',
storyRanks: {
'Adopt-a-thon': 1, // killing the boss twice??
'Game Day': 3,
'Open Night': 3,
"Minchi's Osseous Adventure": 2,
'Olds and Ends': 3,
'Speaking Their Language': 3,
},
},
};
14 changes: 7 additions & 7 deletions apps/frontend/data/item-level-quality.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { convertibleCategories } from '@/components/items/convertible/data';
import { ItemLevels } from './constants';

export const itemLevelQuality: number[][] = [
[convertibleCategories[0].tiers[0].itemLevel + 13, 6], // MID S1 is wack
[convertibleCategories[0].tiers[0].itemLevel, 5], // Mythic raid equivalent
[convertibleCategories[0].tiers[1].itemLevel, 4], // Heroic raid equivalent
[convertibleCategories[0].tiers[2].itemLevel, 3], // Normal raid equivalent
[convertibleCategories[0].tiers[3].itemLevel, 2], // LFR raid equivalent
[convertibleCategories[0].tiers[3].itemLevel - 13, 1],
[ItemLevels.Myth[5], 6], // Lots of gear
[ItemLevels.Myth[1], 5], // Mythic raid equivalent
[ItemLevels.Hero[1], 4], // Heroic raid equivalent
[ItemLevels.Champion[1], 3], // Normal raid equivalent
[ItemLevels.Veteran[1], 2], // LFR raid equivalent
[ItemLevels.Adventurer[1], 1],
];
13 changes: 13 additions & 0 deletions apps/frontend/data/quests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ export const questNameOverride: Record<number, string> = {
96492: 'Coiled Isle WQs', // Special Assignment: Demand and Supply
96029: 'Coiled Isle WQs', // Special Assignment: Face the Swarm
96307: 'Coiled Isle WQs', // Special Assignment: Wraith Wrath
// Midnight delves
91182: 'Parhelion Plaza',
91183: 'Sunkiller Sanctum',
91184: 'Shadowguard Point',
91185: 'The Grudge Pit',
91186: 'Collegiate Calamity',
91187: 'The Gulf of Memory',
91188: "Atal'Aman",
91189: 'The Shadow Enclave',
91190: 'Twilight Crypts',
92444: 'The Darkway',
95715: 'Gnarldor Isle',
95716: 'Ring of Glory',
};

export const globalDailyQuests: Record<number, GlobalDailyQuest> = Object.fromEntries(
Expand Down
Loading
Loading