diff options
Diffstat (limited to 'features/globalSettings')
-rw-r--r-- | features/globalSettings/index.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 69da074..f5913ff 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -201,9 +201,11 @@ class GlobalSettings extends Feature { } updateItemLores() { - if (!this.itemWorth.getValue()) return; + if (!this.itemWorth.getValue() && !this.showChampion.getValue() && !this.showHecatomb.getValue()) return; - [...Player.getInventory().getItems(), ...Player.getContainer().getItems()].forEach(i => { + let items = [...Player.getInventory().getItems(), ...Player.getContainer().getItems()] + + items.forEach(i => { let uuid = getSBUUID(i) if (!uuid) return @@ -217,15 +219,15 @@ class GlobalSettings extends Feature { if (a) { addLore(i, "§eWorth: ", "§6$" + numberWithCommas(Math.round(a))) - return - } - - if (this.requestingPrices.has(uuid)) return + } else { + if (!this.requestingPrices.has(uuid)) { + this.requestingPrices.add(uuid) - this.requestingPrices.add(uuid) + let json = i.getNBT().toObject() + socketConnection.requestItemPrice(json, uuid) + } + } - let json = i.getNBT().toObject() - socketConnection.requestItemPrice(json, uuid) } if (this.showChampion.getValue() && i?.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getDouble("champion_combat_xp")) { |