diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt | 11 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 93edf2416..f3e27957d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -22,6 +22,7 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAbilityScrolls import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getArmorDye import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAttributes +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getBookwormBookCount import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDrillUpgrades import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDungeonStarCount import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments @@ -84,6 +85,7 @@ object EstimatedItemValueCalculator { totalPrice += addTransmissionTuners(stack, list) totalPrice += addManaDisintegrators(stack, list) totalPrice += addPolarvoidBook(stack, list) + totalPrice += addBookwormBook(stack, list) // cosmetic totalPrice += addHelmetSkin(stack, list) @@ -339,6 +341,15 @@ object EstimatedItemValueCalculator { return price } + private fun addBookwormBook(stack: ItemStack, list: MutableList<String>): Double { + val count = stack.getBookwormBookCount() ?: return 0.0 + + val tfHardcodedItemAgain = "BOOKWORM_BOOK".asInternalName() + val price = tfHardcodedItemAgain.getPrice() * count + list.add("§7Bookworm's Favorite Book: §e$count§7/§e5 §7(§6" + NumberUtil.format(price) + "§7)") + return price + } + private fun addSilex(stack: ItemStack, list: MutableList<String>): Double { val tier = stack.getSilexCount() ?: 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 8d600f70e..9f65a71f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -26,6 +26,8 @@ object SkyBlockItemModifierUtils { fun ItemStack.getPolarvoidBookCount() = getAttributeInt("polarvoid") + fun ItemStack.getBookwormBookCount() = getAttributeInt("bookworm_books") + fun ItemStack.getCultivatingCounter() = getAttributeLong("farmed_cultivating") fun ItemStack.getHoeCounter() = getAttributeLong("mined_crops") |