diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-27 00:59:09 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-27 00:59:09 +0200 |
commit | 5f3f7855086624250bf16878b7462520587586a6 (patch) | |
tree | 73515b59daacaeb6a0ff4d04e0923b4524f8d2c9 /src/main/java/at/hannibal2/skyhanni | |
parent | b3c5979a64af565b8215caa0ace675a412a3c91c (diff) | |
download | skyhanni-5f3f7855086624250bf16878b7462520587586a6.tar.gz skyhanni-5f3f7855086624250bf16878b7462520587586a6.tar.bz2 skyhanni-5f3f7855086624250bf16878b7462520587586a6.zip |
crop money display: Using npc price for mushroom cow pet calculation when on ironman, stranded or bingo
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt index 4517155e9..f39826a9a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt @@ -110,8 +110,16 @@ object CropMoneyDisplay { toolHasBountiful?.put(it, reforgeName == "bountiful") if (GardenAPI.mushroomCowPet && it != CropType.MUSHROOM) { - val redPrice = NEUItems.getPrice("ENCHANTED_RED_MUSHROOM") / 160 - val brownPrice = NEUItems.getPrice("ENCHANTED_BROWN_MUSHROOM") / 160 + val (redPrice, brownPrice) = if (LorenzUtils.noTradeMode) { + val redPrice = BazaarApi.getBazaarDataByInternalName("ENCHANTED_RED_MUSHROOM")?.npcPrice ?: 160.0 / 160 + val brownPrice = BazaarApi.getBazaarDataByInternalName("ENCHANTED_BROWN_MUSHROOM")?.npcPrice ?: 160.0 / 160 + redPrice to brownPrice + } else { + val redPrice = NEUItems.getPrice("ENCHANTED_RED_MUSHROOM") / 160 + val brownPrice = NEUItems.getPrice("ENCHANTED_BROWN_MUSHROOM") / 160 + redPrice to brownPrice + } + val mushroomPrice = (redPrice + brownPrice) / 2 val perSecond = 20.0 * it.multiplier * mushroomPrice extraMushroomCowPerk = perSecond * 60 * 60 |