aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java8
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;