From d5919a5e4d4a7958071d1a71990d153a3d8283d3 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sun, 14 Jul 2024 11:55:36 +0200 Subject: [PATCH] fix(stats/slayer): incorrect xpForNext --- src/lib/constants/NotEnoughUpdates-REPO | 2 +- src/lib/stats/slayer.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/constants/NotEnoughUpdates-REPO b/src/lib/constants/NotEnoughUpdates-REPO index 7e67c37ce..9ab226302 160000 --- a/src/lib/constants/NotEnoughUpdates-REPO +++ b/src/lib/constants/NotEnoughUpdates-REPO @@ -1 +1 @@ -Subproject commit 7e67c37ce92cf8a7be4cf09ce594fda148dbffc9 +Subproject commit 9ab226302fe724f91ad60eeafe915f47f5e60264 diff --git a/src/lib/stats/slayer.ts b/src/lib/stats/slayer.ts index b76e85aa2..a1b9b1eb0 100644 --- a/src/lib/stats/slayer.ts +++ b/src/lib/stats/slayer.ts @@ -27,7 +27,7 @@ function getLevel(slayer: string, data: SlayerBoss) { level: 0, maxLevel: 0, xpCurrent: 0, - xpForNext: 0, + xpForNext: constants.SLAYER_XP[slayer] ? constants.SLAYER_XP[slayer]["1"] : 0, maxed: false }; } @@ -37,7 +37,7 @@ function getLevel(slayer: string, data: SlayerBoss) { const maxLevel = Object.keys(constants.SLAYER_XP[slayer]).length; for (const [level, xp] of reversed) { if (data.xp > xp) { - const xpForNext = xp; + const xpForNext = constants.SLAYER_XP[slayer][parseInt(level) + 1]; return { xp: data.xp, xpForNext,