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