diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt | 14 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 2 |
2 files changed, 16 insertions, 0 deletions
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 dcc2574d9..277c84735 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 @@ -50,6 +50,7 @@ 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 @@ -203,6 +204,7 @@ object EstimatedItemValue { totalPrice += addWoodSingularity(stack, list) totalPrice += addJalapenoBook(stack, list) totalPrice += addStatsBook(stack, list) + totalPrice += addEnrichment(stack, list) // counted totalPrice += addMasterStars(stack, list) @@ -567,6 +569,18 @@ object EstimatedItemValue { return price } + private fun addEnrichment(stack: ItemStack, list: MutableList<String>): Double { + + val enrichmentName = stack.getEnrichment() ?: return 0.0 + val internalName = "TALISMAN_ENRICHMENT_$enrichmentName".asInternalName() + + + val price = internalName.getPrice() + val name = internalName.getItemName() + list.add("§7Enrichment: $name §7(§6" + NumberUtil.format(price) + "§7)") + return price + } + private fun addRune(stack: ItemStack, list: MutableList<String>): Double { val internalName = stack.getRune() ?: return 0.0 diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 4cc248ba3..d5a957160 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -109,6 +109,8 @@ object SkyBlockItemModifierUtils { fun ItemStack.getPowerScroll() = getAttributeString("power_ability_scroll")?.asInternalName() + fun ItemStack.getEnrichment() = getAttributeString("talisman_enrichment") + fun ItemStack.getHelmetSkin() = getAttributeString("skin")?.asInternalName() fun ItemStack.getArmorDye() = getAttributeString("dye_item")?.asInternalName() |