aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-11 10:23:46 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-11 10:23:46 +0200
commit3710475c1df8bcecabd3b58941646c635c137315 (patch)
treed26fc2a40fff37a1b0ab1e609878002d921d7ab6
parenta33672adbae767354350c4b214ffada9e1f39460 (diff)
downloadskyhanni-3710475c1df8bcecabd3b58941646c635c137315.tar.gz
skyhanni-3710475c1df8bcecabd3b58941646c635c137315.tar.bz2
skyhanni-3710475c1df8bcecabd3b58941646c635c137315.zip
prevent legendary dungeon items from getting salvaged
-rw-r--r--src/main/java/at/lorenz/mod/HideNotClickableItems.kt22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/at/lorenz/mod/HideNotClickableItems.kt b/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
index 6b4aa9a8a..107684398 100644
--- a/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
+++ b/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
@@ -310,6 +310,17 @@ class HideNotClickableItems {
private fun hideSalvage(chestName: String, stack: ItemStack): Boolean {
if (chestName != "Salvage Item") return false
+ if (ItemUtils.isRecombobulated(stack)) {
+ hideReason = "This item should not be salvaged! (Recombobulated)"
+ return true
+ }
+ for (line in stack.getLore()) {
+ if (line.contains("LEGENDARY DUNGEON")) {
+ hideReason = "This item should not be salvaged! (Legendary)"
+ return true
+ }
+ }
+
val name = stack.cleanName()
val armorSets = listOf(
@@ -346,17 +357,6 @@ class HideNotClickableItems {
for (item in items) {
if (name.endsWith(" $item")) {
-
- if (ItemUtils.isRecombobulated(stack)) {
- hideReason = "This item should not be salvaged! (Recombobulated)"
- return true
- }
-// val rarity = stack.getSkyBlockRarity()
-// if (rarity == ItemRarity.LEGENDARY || rarity == ItemRarity.MYTHIC) {
-// hideReason = "This item should not be salvaged! (Rarity)"
-// return true
-// }
-
return false
}
}