aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt23
2 files changed, 16 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt
index af8b3bbbe..fe21f488f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
+import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getRecipientName
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -10,11 +11,13 @@ class RestorePieceOfWizardPortalLore {
private val config get() = SkyHanniMod.feature.misc
+ private val item by lazy { "WIZARD_PORTAL_MEMENTO".asInternalName() }
+
@SubscribeEvent
fun onTooltip(event: LorenzToolTipEvent) {
if (!config.restorePieceOfWizardPortalLore) return
val stack = event.itemStack
- if (!stack.getInternalName().equals("WIZARD_PORTAL_MEMENTO")) return
+ if (stack.getInternalName() != item) return
val recipient = stack.getRecipientName() ?: return
if (!event.toolTip[5].contains(recipient)) {
event.toolTip.add(5, "ยง7Earned by: $recipient")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
index 79f555300..6300b0cfd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
@@ -38,6 +38,7 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAttributes
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDrillUpgrades
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDungeonStarCount
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments
+import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnrichment
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getExtraAttributes
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getFarmingForDummiesCount
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getGemstones
@@ -49,7 +50,6 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getPowerScroll
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getReforgeName
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getRune
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getSilexCount
-import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnrichment
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getTransmissionTunerCount
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasArtOfPeace
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasArtOfWar
@@ -635,6 +635,16 @@ object EstimatedItemValue {
return price
}
+ val hasAlwaysScavenger = listOf(
+ "CRYPT_DREADLORD_SWORD".asInternalName(),
+ "ZOMBIE_SOLDIER_CUTLASS".asInternalName(),
+ "CONJURING_SWORD".asInternalName(),
+ "EARTH_SHARD".asInternalName(),
+ "ZOMBIE_KNIGHT_SWORD".asInternalName(),
+ "SILENT_DEATH".asInternalName(),
+ "ZOMBIE_COMMANDER_WHIP".asInternalName(),
+ )
+
private fun addEnchantments(stack: ItemStack, list: MutableList<String>): Double {
val enchantments = stack.getEnchantments() ?: return 0.0
@@ -642,17 +652,8 @@ object EstimatedItemValue {
val map = mutableMapOf<String, Double>()
val tieredEnchants = listOf("compact", "cultivating", "champion", "expertise", "hecatomb")
- val hasAlwaysScavenger = listOf(
- "CRYPT_DREADLORD_SWORD",
- "ZOMBIE_SOLDIER_CUTLASS",
- "CONJURING_SWORD",
- "EARTH_SHARD",
- "ZOMBIE_KNIGHT_SWORD",
- "SILENT_DEATH",
- "ZOMBIE_COMMANDER_WHIP",
- )
- val internalName = stack.getInternalName().asString()
+ val internalName = stack.getInternalName()
for ((rawName, rawLevel) in enchantments) {
// efficiency 1-5 is cheap, 6-10 is handled by silex
if (rawName == "efficiency") continue