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:
@@ -109,6 +109,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
|
|||||||
| Bounty Hunter (Rogue) | `rogueBH` |
|
| Bounty Hunter (Rogue) | `rogueBH` |
|
||||||
| Bounty Hunter (Hunter) | `hunterBH` |
|
| Bounty Hunter (Hunter) | `hunterBH` |
|
||||||
| Last Man Standing | `lastManStanding` |
|
| Last Man Standing | `lastManStanding` |
|
||||||
|
| PvP Arena | `pvpArena` |
|
||||||
| Soul Wars Zeal | `soulWarsZeal` |
|
| Soul Wars Zeal | `soulWarsZeal` |
|
||||||
| Rifts Closed | `riftsClosed` |
|
| Rifts Closed | `riftsClosed` |
|
||||||
|
|
||||||
@@ -193,6 +194,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
|
|||||||
leaguePoints: {},
|
leaguePoints: {},
|
||||||
bountyHunter: {},
|
bountyHunter: {},
|
||||||
lastManStanding: {},
|
lastManStanding: {},
|
||||||
|
pvpArena: {},
|
||||||
soulWarsZeal: {},
|
soulWarsZeal: {},
|
||||||
riftsClosed: {},
|
riftsClosed: {},
|
||||||
bosses: {}
|
bosses: {}
|
||||||
|
@@ -87,6 +87,7 @@ test('Parse CSV to json', () => {
|
|||||||
392,250
|
392,250
|
||||||
1,6143
|
1,6143
|
||||||
4814,898
|
4814,898
|
||||||
|
13,4057
|
||||||
37,225
|
37,225
|
||||||
25,1110
|
25,1110
|
||||||
382,2780
|
382,2780
|
||||||
@@ -171,6 +172,7 @@ test('Parse CSV to json', () => {
|
|||||||
rogue: { rank: 89912, score: 37 }
|
rogue: { rank: 89912, score: 37 }
|
||||||
},
|
},
|
||||||
lastManStanding: { rank: 4814, score: 898 },
|
lastManStanding: { rank: 4814, score: 898 },
|
||||||
|
pvpArena: { rank: 13, score: 4057 },
|
||||||
soulWarsZeal: { rank: 37, score: 225 },
|
soulWarsZeal: { rank: 37, score: 225 },
|
||||||
riftsClosed: { rank: 25, score: 1110 },
|
riftsClosed: { rank: 25, score: 1110 },
|
||||||
clues: {
|
clues: {
|
||||||
|
4
__tests__/lynxTitanNamePage.html
vendored
4
__tests__/lynxTitanNamePage.html
vendored
@@ -75,6 +75,10 @@
|
|||||||
.lmsrank:before {
|
.lmsrank:before {
|
||||||
content: url('https://www.runescape.com/img/rsp777/game_icon_lmsrank.png?2');
|
content: url('https://www.runescape.com/img/rsp777/game_icon_lmsrank.png?2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pvparenarank:before {
|
||||||
|
content: url('https://www.runescape.com/img/rsp777/game_icon_pvparenarank.png?2');
|
||||||
|
}
|
||||||
|
|
||||||
.soulwarszeal:before {
|
.soulwarszeal:before {
|
||||||
content: url('https://www.runescape.com/img/rsp777/game_icon_soulwarszeal.png?2');
|
content: url('https://www.runescape.com/img/rsp777/game_icon_soulwarszeal.png?2');
|
||||||
|
@@ -82,4 +82,5 @@
|
|||||||
-1,-1
|
-1,-1
|
||||||
-1,-1
|
-1,-1
|
||||||
-1,-1
|
-1,-1
|
||||||
|
-1,-1
|
||||||
-1,-1
|
-1,-1
|
Can't render this file because it has a wrong number of fields in line 25.
|
@@ -75,7 +75,7 @@ export function parseStats(csv: string): Stats {
|
|||||||
.filter((entry) => !!entry)
|
.filter((entry) => !!entry)
|
||||||
.map((stat) => stat.split(','));
|
.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);
|
throw Error(INVALID_FORMAT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ export function parseStats(csv: string): Stats {
|
|||||||
const [leaguePoints] = activityObjects.splice(0, 1);
|
const [leaguePoints] = activityObjects.splice(0, 1);
|
||||||
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, soulWarsZeal, riftsClosed] = activityObjects.splice(0, 3);
|
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed] = activityObjects.splice(0, 4);
|
||||||
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) => {
|
||||||
@@ -137,6 +137,7 @@ export function parseStats(csv: string): Stats {
|
|||||||
leaguePoints,
|
leaguePoints,
|
||||||
bountyHunter,
|
bountyHunter,
|
||||||
lastManStanding,
|
lastManStanding,
|
||||||
|
pvpArena,
|
||||||
soulWarsZeal,
|
soulWarsZeal,
|
||||||
riftsClosed,
|
riftsClosed,
|
||||||
clues,
|
clues,
|
||||||
|
@@ -118,6 +118,7 @@ export type ActivityName =
|
|||||||
| 'hunterBH'
|
| 'hunterBH'
|
||||||
| 'rogueBH'
|
| 'rogueBH'
|
||||||
| 'lastManStanding'
|
| 'lastManStanding'
|
||||||
|
| 'pvpArena'
|
||||||
| 'soulWarsZeal'
|
| 'soulWarsZeal'
|
||||||
| 'riftsClosed'
|
| 'riftsClosed'
|
||||||
| 'allClues'
|
| 'allClues'
|
||||||
@@ -135,6 +136,7 @@ export interface Stats {
|
|||||||
leaguePoints: Activity;
|
leaguePoints: Activity;
|
||||||
bountyHunter: BH;
|
bountyHunter: BH;
|
||||||
lastManStanding: Activity;
|
lastManStanding: Activity;
|
||||||
|
pvpArena: Activity;
|
||||||
soulWarsZeal: Activity;
|
soulWarsZeal: Activity;
|
||||||
riftsClosed: Activity;
|
riftsClosed: Activity;
|
||||||
bosses: Bosses;
|
bosses: Bosses;
|
||||||
|
@@ -131,6 +131,7 @@ export const ACTIVITIES: ActivityName[] = [
|
|||||||
'eliteClues',
|
'eliteClues',
|
||||||
'masterClues',
|
'masterClues',
|
||||||
'lastManStanding',
|
'lastManStanding',
|
||||||
|
'pvpArena',
|
||||||
'soulWarsZeal',
|
'soulWarsZeal',
|
||||||
'riftsClosed',
|
'riftsClosed',
|
||||||
...BOSSES
|
...BOSSES
|
||||||
@@ -246,6 +247,7 @@ export const FORMATTED_BH_NAMES: FormattedBHNames = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const FORMATTED_LMS = 'Last Man Standing';
|
export const FORMATTED_LMS = 'Last Man Standing';
|
||||||
|
export const FORMATTED_PVP_ARENA = 'PvP Arena';
|
||||||
export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal';
|
export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal';
|
||||||
export const FORMATTED_LEAGUE_POINTS = 'League Points';
|
export const FORMATTED_LEAGUE_POINTS = 'League Points';
|
||||||
export const FORMATTED_RIFTS_CLOSED = 'Rifts Closed';
|
export const FORMATTED_RIFTS_CLOSED = 'Rifts Closed';
|
||||||
|
Reference in New Issue
Block a user