From f939fa3ddc43df924743b997cdcb0dbde76bb04a Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 2 Jun 2021 17:30:25 -0500 Subject: Fix max level --- build/cleaners/skyblock/skills.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/cleaners/skyblock/skills.js') diff --git a/build/cleaners/skyblock/skills.js b/build/cleaners/skyblock/skills.js index 2dcb53f..124e8d9 100644 --- a/build/cleaners/skyblock/skills.js +++ b/build/cleaners/skyblock/skills.js @@ -114,7 +114,7 @@ const skillsDefaultMaxLevel = 50; * @param easierLevel Whether it should use the alternate leveling xp table (used for cosmetic skills and dungeoneering) */ function levelForSkillXp(xp, maxLevel) { - const xpTable = maxLevel <= 25 ? skillXpTableEasier : skillXpTable; + const xpTable = (maxLevel <= 25 ? skillXpTableEasier : skillXpTable).slice(0, maxLevel); const skillLevel = [...xpTable].reverse().findIndex(levelXp => xp >= levelXp); return skillLevel === -1 ? 0 : xpTable.length - skillLevel; } -- cgit