diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt | 9 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt index afd5900f7..25ddb8dac 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt @@ -66,13 +66,13 @@ object BazaarApi { searchForBazaarItem(internalName.itemNameWithoutColor, amount) } - fun searchForBazaarItem(displayName: String, amount: Int = -1) { + fun searchForBazaarItem(displayName: String, amount: Int? = null) { if (!LorenzUtils.inSkyBlock) return if (NEUItems.neuHasFocus()) return if (LorenzUtils.noTradeMode) return if (DungeonAPI.inDungeon() || LorenzUtils.inKuudraFight) return HypixelCommands.bazaar(displayName.removeColor()) - if (amount != -1) OSUtils.copyToClipboard(amount.toString()) + amount?.let { OSUtils.copyToClipboard(it.toString()) } currentSearchedItem = displayName.removeColor() } @@ -96,12 +96,12 @@ object BazaarApi { orderOptionProduct = internalName } else if (itemName.contains("BUY")) { // pickup items from bazaar order - OwnInventoryData.ignoreItem(1.seconds, { it == internalName }) + OwnInventoryData.ignoreItem(1.seconds) { it == internalName } } } if (InventoryUtils.openInventoryName() == "Order options" && itemName == "§cCancel Order") { // pickup items from own bazaar order - OwnInventoryData.ignoreItem(1.seconds, { it == orderOptionProduct }) + OwnInventoryData.ignoreItem(1.seconds) { it == orderOptionProduct } } } @@ -123,6 +123,7 @@ object BazaarApi { } } + // TODO cache @SubscribeEvent fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { if (!LorenzUtils.inSkyBlock) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt index a177d3fe6..dfd7e38f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt @@ -103,7 +103,7 @@ object BazaarCancelledBuyOrderClipboard { event.blockedReason = "bazaar cancelled buy order clipboard" val lastClicked = lastClickedItem ?: error("last clicked bz item is null") - val message = "Bazaar buy order cancelled. Click to reorder. " + + val message = "Bazaar buy order cancelled. Click to re-order. " + "(§8${latestAmount.addSeparators()}x §r${lastClicked.itemName}§e)" ChatUtils.clickableChat( message, |