aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-04 07:51:39 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-04 07:51:39 +0800
commit4784af7103fb0bd45aad28a662ed44297ac7e0b8 (patch)
tree006e5ca1023dba398bbb2602e8c1b00fe963ddb6 /utils
parent6b4f91e27d037b10e6c242352211e2774c34573e (diff)
downloadSoopyV2-4784af7103fb0bd45aad28a662ed44297ac7e0b8.tar.gz
SoopyV2-4784af7103fb0bd45aad28a662ed44297ac7e0b8.tar.bz2
SoopyV2-4784af7103fb0bd45aad28a662ed44297ac7e0b8.zip
Fix command registering breaking
Fix dungeon map and solvers breaking with new map offset Dungeon map Use items instead of text to show puzzles Allow for cata over 50 in hud stat
Diffstat (limited to 'utils')
-rw-r--r--utils/statUtils.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/utils/statUtils.js b/utils/statUtils.js
index fd41110..ae064cf 100644
--- a/utils/statUtils.js
+++ b/utils/statUtils.js
@@ -274,6 +274,20 @@ function getLevelByXp(xp, type, levelCap) {
let progress = Math.max(0, Math.min(xpCurrent / xpForNext, 1));
+
+ if (type === 2 && level === 50) {
+ while (level < levelCap && xpCurrent > 200000000) {
+ level++
+ xpCurrent -= 200000000
+ }
+ if(level < levelCap){
+ progress = xpCurrent / 200000000
+ xpForNext = 200000000
+ }else{
+ progress = 0
+ xpForNext = NaN
+ }
+ }
return {
xp,
level,
@@ -311,8 +325,8 @@ function getSlayerLevelClaimed(slayer) {
return level;
}
-function getDungeoneeringLevel(xp) {
- let a = getLevelByXp(xp, 2, 50);
+function getDungeoneeringLevel(xp, isCata) {
+ let a = getLevelByXp(xp, 2, isCata ? Infinity : 50);
return a.level + a.progress;
}