From b834eb04a0753457ed91c3bca3cc7c4d658a9d56 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Wed, 26 Jun 2024 19:09:03 +0200 Subject: [PATCH] fix(stats): DarthGIgi's things --- src/lib/components/Item.svelte | 4 ++-- src/lib/sections/stats/Accessories.svelte | 2 +- src/lib/stats/player_stats.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/Item.svelte b/src/lib/components/Item.svelte index b20950cf4..ee68895f7 100644 --- a/src/lib/components/Item.svelte +++ b/src/lib/components/Item.svelte @@ -16,10 +16,10 @@ const bgColor = piece.rarity ? getRarityClass(piece.rarity.toLowerCase() as string, "bg") : "bg-background"; const enchanted = isEnchanted(piece as ProcessedItem); - const showNumbers = showCount && (piece as ProcessedItem).Count > 1; - const processedItem = piece as ProcessedItem; const processedPet = piece as unknown as ProcessedPet; + + const showNumbers = showCount && processedItem.Count > 1;
diff --git a/src/lib/sections/stats/Accessories.svelte b/src/lib/sections/stats/Accessories.svelte index 98b82657b..ed557b988 100644 --- a/src/lib/sections/stats/Accessories.svelte +++ b/src/lib/sections/stats/Accessories.svelte @@ -102,7 +102,7 @@ +{accessories.magicalPower.riftPrism} MP {/if} - {#if accessories.magicalPower.hegemony.amount > 0 && accessories.magicalPower.hegemony.rarity !== null} + {#if accessories.magicalPower.hegemony.amount > 0 && accessories.magicalPower.hegemony.rarity}
  • Hegemony Artifact: = diff --git a/src/lib/stats/player_stats.ts b/src/lib/stats/player_stats.ts index bdc92b147..45990bbaf 100644 --- a/src/lib/stats/player_stats.ts +++ b/src/lib/stats/player_stats.ts @@ -106,7 +106,7 @@ export function getPlayerStats(profile: Stats) { } } - if (profile.dungeons?.level?.level !== undefined) { + if (profile.dungeons?.level?.level) { const bonusStats = getBonusStat(profile.dungeons.level.level, "skill_dungeoneering", 50); for (const [name, value] of Object.entries(bonusStats)) {