From f3252519a51246acf181229d29da64858bbc5b13 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 1 Dec 2020 18:59:50 -0500 Subject: Fix past experience returning 0 --- src/main/java/me/Danker/utils/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 245d071..9299745 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -247,7 +247,7 @@ public class Utils { public static int getPastXpEarned(int currentLevelXp, int limit) { if (currentLevelXp == 0) return skillXPPerLevel[limit]; - for (int i = 1, xpAdded = 0; i < limit; i++) { + for (int i = 1, xpAdded = 0; i <= limit; i++) { xpAdded += skillXPPerLevel[i - 1]; if (currentLevelXp == skillXPPerLevel[i]) return xpAdded; } -- cgit