diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-29 10:57:57 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-29 10:57:57 +0800 |
commit | 996d99f533e8dcc8aa4a471097f5d6a93de894f4 (patch) | |
tree | 4a965697b77983f07457c2498c08738d0d2624c9 /src/features/dungeonSolvers | |
parent | 62b3e2b485fc576b5c3ca90035e44b29fdf48ae3 (diff) | |
download | SoopyV2-996d99f533e8dcc8aa4a471097f5d6a93de894f4.tar.gz SoopyV2-996d99f533e8dcc8aa4a471097f5d6a93de894f4.tar.bz2 SoopyV2-996d99f533e8dcc8aa4a471097f5d6a93de894f4.zip |
fix api cant find current profile
Diffstat (limited to 'src/features/dungeonSolvers')
-rw-r--r-- | src/features/dungeonSolvers/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/features/dungeonSolvers/index.js b/src/features/dungeonSolvers/index.js index 4d4fb81..787879a 100644 --- a/src/features/dungeonSolvers/index.js +++ b/src/features/dungeonSolvers/index.js @@ -671,15 +671,15 @@ class DungeonSolvers extends Feature { let data = await fetch(`https://api.hypixel.net/skyblock/profiles?key=${this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue()}&uuid=${uuid}`).json() if (!data.success) return - let latestProfile = [0, undefined] + let latestProfile = undefined data.profiles.forEach(p => { - if (p.members[uuid].last_save > latestProfile[0]) { - latestProfile = [p.members[uuid].last_save, p.members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY")] + if (p.selected) { + latestProfile = p.members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY") } }) - if (latestProfile[1]) { + if (latestProfile) { this.firstDeathHadSpirit = true if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " has spirit pet!") } else { |