diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-10-06 17:32:46 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-10-06 17:32:46 +0800 |
commit | ac4bec7b9a9feb8372ede945f9869c197789c660 (patch) | |
tree | f9e51136a48c1f13bd41a5e3b515e935a5e54ea8 /src/features/slayers | |
parent | 26996a65c93de407e4a12403f967b722a6dbf710 (diff) | |
download | SoopyV2-ac4bec7b9a9feb8372ede945f9869c197789c660.tar.gz SoopyV2-ac4bec7b9a9feb8372ede945f9869c197789c660.tar.bz2 SoopyV2-ac4bec7b9a9feb8372ede945f9869c197789c660.zip |
Location hud element
Diffstat (limited to 'src/features/slayers')
-rw-r--r-- | src/features/slayers/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/features/slayers/index.js b/src/features/slayers/index.js index a88734f..47817e2 100644 --- a/src/features/slayers/index.js +++ b/src/features/slayers/index.js @@ -34,7 +34,7 @@ class Slayers extends Feature { } inSkyblock() { - return this.FeatureManager.features["dataLoader"] && this.FeatureManager.features["dataLoader"].class.isInSkyblock + return this.FeatureManager.features["dataLoader"].class.isInSkyblock } onEnable() { this.initVariables(); @@ -234,7 +234,7 @@ class Slayers extends Feature { this.registerEvent("renderOverlay", this.renderOverlay).registeredWhen(() => this.spawnAlert.getValue() || this.slainAlert.getValue()); this.registerSoopy("apiLoad", this.apiLoad); - if (this.FeatureManager.features["dataLoader"] && this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock) { + if (this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock) { this.apiLoad(this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock, "skyblock", true, true); } @@ -886,7 +886,7 @@ class Slayers extends Feature { let runsperHour = (60000 * 60) / averageLength; let expPerHour = averageExp * runsperHour; - if (this.FeatureManager.features["dataLoader"] && Date.now() - this.lastSlayerFinishes[this.lastSlayerFinishes.length - 1] < 60000 * 5 || (this.FeatureManager.features["dataLoader"].class?.slayerXpToSpawn && this.FeatureManager.features["dataLoader"].class.slayerXpToSpawn[0] !== 0)) { + if (Date.now() - this.lastSlayerFinishes[this.lastSlayerFinishes.length - 1] < 60000 * 5 || (this.FeatureManager.features["dataLoader"].class?.slayerXpToSpawn && this.FeatureManager.features["dataLoader"].class.slayerXpToSpawn[0] !== 0)) { if (this.lastSlayerFinishes.length > 1) { this.slayerSpeedRatesElement.setText("&6Slayer speed&7> &f" + Math.floor(averageLength / 60000) + ":" + ((Math.floor(averageLength / 1000) % 60 < 10 ? "0" : "") + (Math.floor(averageLength / 1000) % 60)) + "\n&6Exp/hour&7> &f" + numberWithCommas(Math.round(expPerHour)) + "\n&6Kills/hour&7> &f" + Math.floor(runsperHour)); } else { |