mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
Add support for Rifts Closed
This commit is contained in:
@@ -75,7 +75,7 @@ export function parseStats(csv: string): Stats {
|
||||
.filter((entry) => !!entry)
|
||||
.map((stat) => stat.split(','));
|
||||
|
||||
if (splitCSV.length !== SKILLS.length + BH_MODES.length + CLUES.length + BOSSES.length + 3) {
|
||||
if (splitCSV.length !== SKILLS.length + BH_MODES.length + CLUES.length + BOSSES.length + 4) {
|
||||
throw Error(INVALID_FORMAT_ERROR);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ export function parseStats(csv: string): Stats {
|
||||
const [leaguePoints] = activityObjects.splice(0, 1);
|
||||
const bhObjects = activityObjects.splice(0, BH_MODES.length);
|
||||
const clueObjects = activityObjects.splice(0, CLUES.length);
|
||||
const [lastManStanding, soulWarsZeal] = activityObjects.splice(0, 2);
|
||||
const [lastManStanding, soulWarsZeal, riftsClosed] = activityObjects.splice(0, 3);
|
||||
const bossObjects = activityObjects.splice(0, BOSSES.length);
|
||||
|
||||
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {
|
||||
@@ -138,6 +138,7 @@ export function parseStats(csv: string): Stats {
|
||||
bountyHunter,
|
||||
lastManStanding,
|
||||
soulWarsZeal,
|
||||
riftsClosed,
|
||||
clues,
|
||||
bosses
|
||||
};
|
||||
|
Reference in New Issue
Block a user