From 1fec7bfec8d08a4b8c696eb55fa238a9f1cfd1c5 Mon Sep 17 00:00:00 2001 From: GDjkhp Date: Sun, 4 Aug 2024 09:55:10 +0800 Subject: [PATCH] revert next reward --- meeseeks-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meeseeks-script.js b/meeseeks-script.js index c9e76a7..ee395b7 100644 --- a/meeseeks-script.js +++ b/meeseeks-script.js @@ -260,7 +260,7 @@ function segs(player, barCustom, nextLevel) { roleRewards.forEach((reward, index) => { if (player.level >= reward.rank) { - const nextReward = roleRewards[index + 1]; + const nextReward = roleRewards[index + 1] || { rank: player.level + 1 }; const segmentXP = getTotalXP(Math.min(player.level, nextReward.rank)) - getTotalXP(reward.rank); const segmentPercentage = (segmentXP / getTotalXP(nextLevel)) * 100;