diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 33021af..9d460bc 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -239,7 +239,13 @@ public class Utils { } public static int getPastXpEarned(int currentLevelXp, int limit) { - if (currentLevelXp == 0) return skillXPPerLevel[limit]; + if (currentLevelXp == 0) { + int xpAdded = 0; + for (int i = 1; i <= limit; i++) { + xpAdded += skillXPPerLevel[i]; + } + return xpAdded; + } for (int i = 1, xpAdded = 0; i <= limit; i++) { xpAdded += skillXPPerLevel[i - 1]; if (currentLevelXp == skillXPPerLevel[i]) return xpAdded; |