From f8a0c81f37ff4f726ca18408c3d5772f0794d749 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Wed, 10 Aug 2022 21:24:10 +0800 Subject: fix enchant thing + tall gui + meta --- features/globalSettings/index.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'features/globalSettings') 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")) { -- cgit