diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-11 10:23:46 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-11 10:23:46 +0200 |
commit | 3710475c1df8bcecabd3b58941646c635c137315 (patch) | |
tree | d26fc2a40fff37a1b0ab1e609878002d921d7ab6 /src/main | |
parent | a33672adbae767354350c4b214ffada9e1f39460 (diff) | |
download | skyhanni-3710475c1df8bcecabd3b58941646c635c137315.tar.gz skyhanni-3710475c1df8bcecabd3b58941646c635c137315.tar.bz2 skyhanni-3710475c1df8bcecabd3b58941646c635c137315.zip |
prevent legendary dungeon items from getting salvaged
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/lorenz/mod/HideNotClickableItems.kt | 22 |
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 } } |