diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-12-01 18:59:50 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-12-01 18:59:50 -0500 |
commit | f3252519a51246acf181229d29da64858bbc5b13 (patch) | |
tree | 8aab7859b4dd52dd9641be4e5643eddaf202db3a /src/main/java/me/Danker | |
parent | 273f8c28f1a2c7f6f3cf0acc9f3e8ca941ed5f89 (diff) | |
download | SkyblockMod-f3252519a51246acf181229d29da64858bbc5b13.tar.gz SkyblockMod-f3252519a51246acf181229d29da64858bbc5b13.tar.bz2 SkyblockMod-f3252519a51246acf181229d29da64858bbc5b13.zip |
Fix past experience returning 0
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |