mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
Add support for PvP Arena activity
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 + 4) {
|
||||
if (splitCSV.length !== SKILLS.length + BH_MODES.length + CLUES.length + BOSSES.length + 5) {
|
||||
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, riftsClosed] = activityObjects.splice(0, 3);
|
||||
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed] = activityObjects.splice(0, 4);
|
||||
const bossObjects = activityObjects.splice(0, BOSSES.length);
|
||||
|
||||
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {
|
||||
@@ -137,6 +137,7 @@ export function parseStats(csv: string): Stats {
|
||||
leaguePoints,
|
||||
bountyHunter,
|
||||
lastManStanding,
|
||||
pvpArena,
|
||||
soulWarsZeal,
|
||||
riftsClosed,
|
||||
clues,
|
||||
|
Reference in New Issue
Block a user