Fix csv parsing, tests.

This commit is contained in:
maxswa
2025-02-24 19:03:56 -05:00
parent b3fc5846f3
commit 99fc97f05e
3 changed files with 13 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
58378,99,14103220 58378,99,14103220
13188,99,16573909 13188,99,16573909
36283,99,15061037 36283,99,15061037
17138,99,14670565 17137,99,14670565
8751,99,16169665 8751,99,16169665
60803,99,14390315 60803,99,14390315
1718,99,57850681 1718,99,57850681
@@ -90,7 +90,7 @@
113862,201 113862,201
1969,538 1969,538
12346,671 12346,671
5608,149 5606,149
550,2450 550,2450
25557,310 25557,310
1391,538 1391,538
@@ -103,6 +103,6 @@
287,7096 287,7096
97368,51 97368,51
15591,2780 15591,2780
1000407,67 1000405,67
213696,25 213696,25
240082,340 240082,340
1 2210 2277 1150073045
14 58378 99 14103220
15 13188 99 16573909
16 36283 99 15061037
17 17138 17137 99 14670565
18 8751 99 16169665
19 60803 99 14390315
20 1718 99 57850681
90 113862 201
91 1969 538
92 12346 671
93 5608 5606 149
94 550 2450
95 25557 310
96 1391 538
103 287 7096
104 97368 51
105 15591 2780
106 1000407 1000405 67
107 213696 25
108 240082 340

View File

@@ -227,8 +227,14 @@ export function parseStats(csv: string): Stats {
const [leaguePoints, deadmanPoints] = activityObjects.splice(0, 2); const [leaguePoints, deadmanPoints] = activityObjects.splice(0, 2);
const bhObjects = activityObjects.splice(0, BH_MODES.length); const bhObjects = activityObjects.splice(0, BH_MODES.length);
const clueObjects = activityObjects.splice(0, CLUES.length); const clueObjects = activityObjects.splice(0, CLUES.length);
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed, colosseumGlory, collectionsLogged] = const [
activityObjects.splice(0, 6); lastManStanding,
pvpArena,
soulWarsZeal,
riftsClosed,
colosseumGlory,
collectionsLogged
] = activityObjects.splice(0, 6);
const bossObjects = activityObjects.splice(0, BOSSES.length); const bossObjects = activityObjects.splice(0, BOSSES.length);
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => { const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {

View File

@@ -123,6 +123,7 @@ export const BOSSES: Boss[] = [
'corruptedGauntlet', 'corruptedGauntlet',
'hueycoatl', 'hueycoatl',
'leviathan', 'leviathan',
'royalTitans',
'whisperer', 'whisperer',
'theatreOfBlood', 'theatreOfBlood',
'theatreOfBloodHardMode', 'theatreOfBloodHardMode',
@@ -158,6 +159,7 @@ export const ACTIVITIES: ActivityName[] = [
'soulWarsZeal', 'soulWarsZeal',
'riftsClosed', 'riftsClosed',
'colosseumGlory', 'colosseumGlory',
'collectionsLogged',
...BOSSES ...BOSSES
]; ];