-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(hiscores): fix scurrius breaking hiscores
- Loading branch information
1 parent
e0a2fdb
commit 345df2c
Showing
18 changed files
with
295 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
@osrs-tracker/hiscores/dist/parser/parse-order/parse-order.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
@osrs-tracker/hiscores/dist/parser/parse-order/po-2023-08-23.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { ParseOrder } from './parse-order'; | ||
export declare const PO_2023_08_23: ParseOrder; |
2 changes: 1 addition & 1 deletion
2
.../dist/parser/parse-order/po-2023-08-24.js → .../dist/parser/parse-order/po-2023-08-23.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
@osrs-tracker/hiscores/dist/parser/parse-order/po-2023-08-24.d.ts
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
@osrs-tracker/hiscores/dist/parser/parse-order/po-2024-01-24.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { ParseOrder } from './parse-order'; | ||
export declare const PO_2024_01_24: ParseOrder; |
103 changes: 103 additions & 0 deletions
103
@osrs-tracker/hiscores/dist/parser/parse-order/po-2024-01-24.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import { BossEnum, BountyHunterEnum, ClueScrollsEnum, CompetitiveEnum, MiniGameEnum, RaidEnum, SkillEnum, } from '../../models/hiscore.enum'; | ||
export const PO_2024_01_24 = [ | ||
SkillEnum.Overall, | ||
SkillEnum.Attack, | ||
SkillEnum.Defence, | ||
SkillEnum.Strength, | ||
SkillEnum.Hitpoints, | ||
SkillEnum.Ranged, | ||
SkillEnum.Prayer, | ||
SkillEnum.Magic, | ||
SkillEnum.Cooking, | ||
SkillEnum.Woodcutting, | ||
SkillEnum.Fletching, | ||
SkillEnum.Fishing, | ||
SkillEnum.Firemaking, | ||
SkillEnum.Crafting, | ||
SkillEnum.Smithing, | ||
SkillEnum.Mining, | ||
SkillEnum.Herblore, | ||
SkillEnum.Agility, | ||
SkillEnum.Thieving, | ||
SkillEnum.Slayer, | ||
SkillEnum.Farming, | ||
SkillEnum.Runecraft, | ||
SkillEnum.Hunter, | ||
SkillEnum.Construction, | ||
CompetitiveEnum.LeaguePoints, | ||
CompetitiveEnum.Unknown, | ||
BountyHunterEnum.BountyHunter, | ||
BountyHunterEnum.BountyHunterRogues, | ||
BountyHunterEnum.BountyHunterLegacy, | ||
BountyHunterEnum.BountyHunterLegacyRogues, | ||
ClueScrollsEnum.ClueScrollsAll, | ||
ClueScrollsEnum.ClueScrollsBeginner, | ||
ClueScrollsEnum.ClueScrollsEasy, | ||
ClueScrollsEnum.ClueScrollsMedium, | ||
ClueScrollsEnum.ClueScrollsHard, | ||
ClueScrollsEnum.ClueScrollsElite, | ||
ClueScrollsEnum.ClueScrollsMaster, | ||
CompetitiveEnum.LastManStanding, | ||
CompetitiveEnum.PvpArena, | ||
MiniGameEnum.SoulWarsZeal, | ||
MiniGameEnum.RiftsClosed, | ||
BossEnum.AbyssalSire, | ||
BossEnum.AlchemicalHydra, | ||
BossEnum.Artio, | ||
BossEnum.BarrowsChests, | ||
BossEnum.Bryophyta, | ||
BossEnum.Callisto, | ||
BossEnum.Calvarion, | ||
BossEnum.Cerberus, | ||
RaidEnum.ChambersOfXeric, | ||
RaidEnum.ChambersOfXericChallengeMode, | ||
BossEnum.ChaosElemental, | ||
BossEnum.ChaosFanatic, | ||
BossEnum.CommanderZilyana, | ||
BossEnum.CorporealBeast, | ||
BossEnum.CrazyArchaeologist, | ||
BossEnum.DagannothPrime, | ||
BossEnum.DagannothRex, | ||
BossEnum.DagannothSupreme, | ||
BossEnum.DerangedArchaeologist, | ||
BossEnum.DukeSucellus, | ||
BossEnum.GeneralGraardor, | ||
BossEnum.GiantMole, | ||
BossEnum.GrotesqueGuardians, | ||
BossEnum.Hespori, | ||
BossEnum.KalphiteQueen, | ||
BossEnum.KingBlackDragon, | ||
BossEnum.Kraken, | ||
BossEnum.KreeArra, | ||
BossEnum.KrilTsutsaroth, | ||
BossEnum.Mimic, | ||
BossEnum.Nex, | ||
BossEnum.Nightmare, | ||
BossEnum.PhosanisNightmare, | ||
BossEnum.Obor, | ||
BossEnum.PhantomMuspah, | ||
BossEnum.Sarachnis, | ||
BossEnum.Scorpia, | ||
BossEnum.Scurrius, | ||
BossEnum.Skotizo, | ||
BossEnum.Spindel, | ||
BossEnum.Tempoross, | ||
RaidEnum.TheGauntlet, | ||
RaidEnum.TheCorruptedGauntlet, | ||
BossEnum.TheLeviathan, | ||
BossEnum.TheWhisperer, | ||
RaidEnum.TheatreOfBlood, | ||
RaidEnum.TheatreOfBloodHardMode, | ||
BossEnum.ThermoNuclearSmokeDevil, | ||
RaidEnum.TombsOfAmascut, | ||
RaidEnum.TombsOfAmascutExpertMode, | ||
BossEnum.TzKalZuk, | ||
BossEnum.TzTokJad, | ||
BossEnum.Vardorvis, | ||
BossEnum.Venenatis, | ||
BossEnum.Vetion, | ||
BossEnum.Vorkath, | ||
BossEnum.Wintertodt, | ||
BossEnum.Zalcano, | ||
BossEnum.Zulrah, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
@osrs-tracker/hiscores/src/parser/parse-order/po-2024-01-24.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { describe, expect, it } from '@jest/globals'; | ||
import { BossEnum, BountyHunterEnum } from '../../models/hiscore.enum'; | ||
import { parseHiscoreString } from '../parser'; | ||
|
||
describe('Parser with 2024-01-24 parse order', () => { | ||
it('should parse new scurries', () => { | ||
const hiscoreString = | ||
'29662,2277,412893314\n60733,99,21973569\n37363,99,21038715\n51220,99,33114139\n57327,99,44221838\n70048,99,39958954\n34499,99,13373152\n78574,99,20610579\n78127,99,14436977\n59847,99,13788559\n86251,99,13184630\n51249,99,13650444\n65642,99,13933700\n37083,99,14410362\n85067,99,13038084\n77902,99,13095989\n25776,99,13460001\n17417,99,13911338\n58982,99,13750029\n77538,99,14736808\n140480,99,13686733\n44726,99,13087967\n64775,99,13080480\n14895,99,13350267\n-1,-1\n-1,-1\n-1,-1\n-1,-1\n159115,7\n-1,-1\n14635,1512\n890029,2\n12263,403\n31643,386\n13416,449\n5594,204\n29859,68\n-1,-1\n-1,-1\n-1,-1\n109537,188\n91086,249\n92002,592\n-1,-1\n64961,596\n3419,156\n207907,6\n-1,-1\n75687,762\n41830,455\n-1,-1\n130828,25\n164821,25\n100946,118\n6563,1000\n202760,28\n133125,179\n171104,217\n130469,184\n108439,25\n-1,-1\n88128,413\n68299,466\n177094,54\n50015,110\n103760,115\n126853,258\n165022,1428\n46729,270\n27133,342\n21062,8\n-1,-1\n-1,-1\n27037,20\n215320,6\n-1,-1\n154289,42\n104259,30\n-1,-1\n218294,22\n-1,-1\n197906,86\n-1,-1\n86572,177\n-1,-1\n-1,-1\n28689,179\n-1,-1\n223859,23\n34128,113\n23940,165\n61722,1\n62789,14\n10282,1051\n-1,-1\n142826,9\n248070,232\n27721,688\n10186,638\n67481,1459'; | ||
|
||
const hiscore = parseHiscoreString(hiscoreString, new Date(2024, 0, 24, 12)); | ||
|
||
expect(hiscore.bountyHunter[BountyHunterEnum.BountyHunterLegacy]).toEqual({ | ||
name: BountyHunterEnum.BountyHunterLegacy, | ||
rank: 159115, | ||
score: 7, | ||
}); | ||
expect(hiscore.bosses[BossEnum.Scorpia]).toEqual({ | ||
name: BossEnum.Scorpia, | ||
rank: 104259, | ||
score: 30, | ||
}); | ||
expect(hiscore.bosses[BossEnum.Scurrius]).toEqual({ | ||
name: BossEnum.Scurrius, | ||
rank: -1, | ||
score: -1, | ||
}); | ||
expect(hiscore.bosses[BossEnum.Skotizo]).toEqual({ | ||
name: BossEnum.Skotizo, | ||
rank: 218294, | ||
score: 22, | ||
}); | ||
}); | ||
}); |
128 changes: 128 additions & 0 deletions
128
@osrs-tracker/hiscores/src/parser/parse-order/po-2024-01-24.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
import { | ||
BossEnum, | ||
BountyHunterEnum, | ||
ClueScrollsEnum, | ||
CompetitiveEnum, | ||
MiniGameEnum, | ||
RaidEnum, | ||
SkillEnum, | ||
} from '../../models/hiscore.enum'; | ||
import { ParseOrder } from './parse-order'; | ||
|
||
/** Deadman: Apocalypse */ | ||
export const PO_2024_01_24: ParseOrder = [ | ||
SkillEnum.Overall, | ||
SkillEnum.Attack, | ||
SkillEnum.Defence, | ||
SkillEnum.Strength, | ||
SkillEnum.Hitpoints, | ||
SkillEnum.Ranged, | ||
SkillEnum.Prayer, | ||
SkillEnum.Magic, | ||
SkillEnum.Cooking, | ||
SkillEnum.Woodcutting, | ||
SkillEnum.Fletching, | ||
SkillEnum.Fishing, | ||
SkillEnum.Firemaking, | ||
SkillEnum.Crafting, | ||
SkillEnum.Smithing, | ||
SkillEnum.Mining, | ||
SkillEnum.Herblore, | ||
SkillEnum.Agility, | ||
SkillEnum.Thieving, | ||
SkillEnum.Slayer, | ||
SkillEnum.Farming, | ||
SkillEnum.Runecraft, | ||
SkillEnum.Hunter, | ||
SkillEnum.Construction, | ||
|
||
CompetitiveEnum.LeaguePoints, | ||
CompetitiveEnum.Unknown, | ||
|
||
BountyHunterEnum.BountyHunter, | ||
BountyHunterEnum.BountyHunterRogues, | ||
BountyHunterEnum.BountyHunterLegacy, | ||
BountyHunterEnum.BountyHunterLegacyRogues, | ||
|
||
ClueScrollsEnum.ClueScrollsAll, | ||
ClueScrollsEnum.ClueScrollsBeginner, | ||
ClueScrollsEnum.ClueScrollsEasy, | ||
ClueScrollsEnum.ClueScrollsMedium, | ||
ClueScrollsEnum.ClueScrollsHard, | ||
ClueScrollsEnum.ClueScrollsElite, | ||
ClueScrollsEnum.ClueScrollsMaster, | ||
|
||
CompetitiveEnum.LastManStanding, | ||
CompetitiveEnum.PvpArena, | ||
|
||
MiniGameEnum.SoulWarsZeal, | ||
MiniGameEnum.RiftsClosed, | ||
|
||
BossEnum.AbyssalSire, | ||
BossEnum.AlchemicalHydra, | ||
BossEnum.Artio, | ||
BossEnum.BarrowsChests, | ||
BossEnum.Bryophyta, | ||
BossEnum.Callisto, | ||
BossEnum.Calvarion, | ||
BossEnum.Cerberus, | ||
|
||
RaidEnum.ChambersOfXeric, | ||
RaidEnum.ChambersOfXericChallengeMode, | ||
|
||
BossEnum.ChaosElemental, | ||
BossEnum.ChaosFanatic, | ||
BossEnum.CommanderZilyana, | ||
BossEnum.CorporealBeast, | ||
BossEnum.CrazyArchaeologist, | ||
BossEnum.DagannothPrime, | ||
BossEnum.DagannothRex, | ||
BossEnum.DagannothSupreme, | ||
BossEnum.DerangedArchaeologist, | ||
BossEnum.DukeSucellus, | ||
BossEnum.GeneralGraardor, | ||
BossEnum.GiantMole, | ||
BossEnum.GrotesqueGuardians, | ||
BossEnum.Hespori, | ||
BossEnum.KalphiteQueen, | ||
BossEnum.KingBlackDragon, | ||
BossEnum.Kraken, | ||
BossEnum.KreeArra, | ||
BossEnum.KrilTsutsaroth, | ||
BossEnum.Mimic, | ||
BossEnum.Nex, | ||
BossEnum.Nightmare, | ||
BossEnum.PhosanisNightmare, | ||
BossEnum.Obor, | ||
BossEnum.PhantomMuspah, | ||
BossEnum.Sarachnis, | ||
BossEnum.Scorpia, | ||
BossEnum.Scurrius, | ||
BossEnum.Skotizo, | ||
BossEnum.Spindel, | ||
BossEnum.Tempoross, | ||
|
||
RaidEnum.TheGauntlet, | ||
RaidEnum.TheCorruptedGauntlet, | ||
|
||
BossEnum.TheLeviathan, | ||
BossEnum.TheWhisperer, | ||
|
||
RaidEnum.TheatreOfBlood, | ||
RaidEnum.TheatreOfBloodHardMode, | ||
|
||
BossEnum.ThermoNuclearSmokeDevil, | ||
|
||
RaidEnum.TombsOfAmascut, | ||
RaidEnum.TombsOfAmascutExpertMode, | ||
|
||
BossEnum.TzKalZuk, | ||
BossEnum.TzTokJad, | ||
BossEnum.Vardorvis, | ||
BossEnum.Venenatis, | ||
BossEnum.Vetion, | ||
BossEnum.Vorkath, | ||
BossEnum.Wintertodt, | ||
BossEnum.Zalcano, | ||
BossEnum.Zulrah, | ||
]; |
Oops, something went wrong.