aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-09-24 23:14:56 -0400
committerbowser0000 <bowser0000@gmail.com>2020-09-24 23:14:56 -0400
commit050a1b2d8fbea8567de76d6515908470054d81c1 (patch)
tree17cc9ae40b32812031b13577aaa9c00d201a51ee /src/main/java/me/Danker/utils
parentba5deced2daac3e5be5651121be139cd0a9fb6b6 (diff)
downloadSkyblockMod-050a1b2d8fbea8567de76d6515908470054d81c1.tar.gz
SkyblockMod-050a1b2d8fbea8567de76d6515908470054d81c1.tar.bz2
SkyblockMod-050a1b2d8fbea8567de76d6515908470054d81c1.zip
Add option for displaying total skill xp instead of progress to next level
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java9
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;
+ }
+
}