diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-06-27 07:31:21 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-06-27 07:31:21 +0800 |
commit | 4701f3b3d96eeb50df9ec5af6a5e94c654a0bdcc (patch) | |
tree | d2a7b01b12b97e1e528b993d1234125e42f2a425 /features/betterGuis | |
parent | c94aa38236c9b73a9f5a9dda30a6d9039d1770c9 (diff) | |
download | SoopyV2-4701f3b3d96eeb50df9ec5af6a5e94c654a0bdcc.tar.gz SoopyV2-4701f3b3d96eeb50df9ec5af6a5e94c654a0bdcc.tar.bz2 SoopyV2-4701f3b3d96eeb50df9ec5af6a5e94c654a0bdcc.zip |
+ fix overflow mana sometimes not showing in mana bar
Diffstat (limited to 'features/betterGuis')
-rw-r--r-- | features/betterGuis/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js index ec30c36..f509674 100644 --- a/features/betterGuis/index.js +++ b/features/betterGuis/index.js @@ -141,6 +141,7 @@ class BetterGuis extends Feature { this.mana = 0 this.overflowMana = 0 this.maxMana = 0 + this.lastOverFlow = Date.now() this.slotMatches = new Map() this.registerEvent("renderHealth", this.renderHealth).registeredWhen(() => this.inSkyblock() && this.customBars.getValue()) @@ -152,6 +153,7 @@ class BetterGuis extends Feature { registerActionBar2.trigger.setCriteria('&3${curr}ʬ').setParameter('contains'); //&c2532/2532❤ &a798&a❈ Defense &b2525/2525✎ &31ʬ&r (100) //&c2532/2532❤ &f20&f❂ True Defense &b2414/2414✎ &3600ʬ&r (13) + //&c2665/2665❤ &a972&a❈ Defense &b2145/2145✎ &3600ʬ&r this.registerEvent("guiRender", this.postGuiRender).registeredWhen(() => this.chestSearchBar.getValue()) this.registerEvent("guiMouseClick", this.guiMouseClick).registeredWhen(() => this.chestSearchBar.getValue()) this.registerEvent("guiKey", this.guiKey).registeredWhen(() => this.chestSearchBar.getValue()) @@ -165,11 +167,12 @@ class BetterGuis extends Feature { } this.mana = parseInt(curr) this.maxMana = parseInt(max) - this.overflowMana = 0 + if (Date.now() - this.lastOverFlow > 1000) this.overflowMana = 0 } actionbarOverflowMana(curr) { this.overflowMana = parseInt(curr) + this.lastOverFlow = Date.now() } renderMana(event) { |