diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt index 8e2b0ceb1..4bcb827ac 100644 --- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt @@ -40,12 +40,8 @@ class HideNotClickableItems { val hideNotClickableItems = event.getConstant("HideNotClickableItems")!! hideNpcSellFilter.load(hideNotClickableItems["hide_npc_sell"].asJsonObject) hideInStorageFilter.load(hideNotClickableItems["hide_in_storage"].asJsonObject) - - val tradeNpcs = event.getConstant("TradeNpcs")!! - tradeNpcFilter.load(tradeNpcs) - + tradeNpcFilter.load(event.getConstant("TradeNpcs")!!) updateSalvageList(hideNotClickableItems) - hidePlayerTradeFilter.load(hideNotClickableItems["hide_player_trade"].asJsonObject) notAuctionableFilter.load(hideNotClickableItems["not_auctionable"].asJsonObject) @@ -242,7 +238,7 @@ class HideNotClickableItems { private fun hidePlayerTrade(chestName: String, stack: ItemStack): Boolean { if (!chestName.startsWith("You ")) return false - if (ItemUtils.isSoulBound(stack)) { + if (ItemUtils.isCoopSoulBound(stack)) { hideReason = "Soulbound items cannot be traded!" return true } @@ -368,7 +364,7 @@ class HideNotClickableItems { } private fun isNotAuctionable(stack: ItemStack): Boolean { - if (ItemUtils.isSoulBound(stack)) { + if (ItemUtils.isCoopSoulBound(stack)) { hideReason = "Soulbound items cannot be auctioned!" return true } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 243cbc1dd..60858bc27 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -31,7 +31,10 @@ object ItemUtils { fun ItemStack.getLore() = ItemUtil.getItemLore(this) - fun isSoulBound(stack: ItemStack): Boolean = stack.getLore().any { it.contains(" Soulbound ") } + fun isCoopSoulBound(stack: ItemStack): Boolean = + stack.getLore().any { + it == "§8§l* §8Co-op Soulbound §8§l*" || it == "§8§l* §8Soulbound §8§l*" + } fun isRecombobulated(stack: ItemStack): Boolean = stack.getLore().any { it.contains("§k") } |