aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
index c88a66bd2..1004f9759 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
@@ -164,7 +164,7 @@ object SackAPI {
val info = TrophyFishManager.getInfo(trophyFishName)
val rarity = TrophyRarity.getByName(trophyRarityName) ?: TrophyRarity.BRONZE
val filletValue = (info?.getFilletValue(rarity) ?: 0) * stored.toLong()
- item.magmaFish = filletValue.toString()
+ item.magmaFish = filletValue
"MAGMA_FISH".asInternalName().sackPrice(filletValue.toString())
} else {
internalName.sackPrice(stored).coerceAtLeast(0)
@@ -328,7 +328,7 @@ object SackAPI {
var stored: String = "0",
var total: String = "0",
var price: Long = 0,
- var magmaFish: String = "0",
+ var magmaFish: Long = 0,
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
index 7e1c50f1b..2a7498354 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
@@ -79,6 +79,7 @@ object SackDisplay {
val amountShowing = if (config.itemToShow > sortedPairs.size) sortedPairs.size else config.itemToShow
newDisplay.addAsSingletonList("§7Items in Sacks: §o(Rendering $amountShowing of ${sortedPairs.size} items)")
for ((itemName, item) in sortedPairs) {
+
val (internalName, colorCode, stored, total, price, magmaFish) = item
totalPrice += price
if (rendered >= config.itemToShow) continue
@@ -102,15 +103,15 @@ object SackDisplay {
)
if (colorCode == "§a") add(" §c§l(Full!)")
- if (SackAPI.isTrophySack && magmaFish.toLong() > 0) {
- totalMagmaFish += magmaFish.toLong()
+ if (SackAPI.isTrophySack && magmaFish > 0) {
+ totalMagmaFish += magmaFish
add(
Renderable.hoverTips(
- " §7(§d${magmaFish.toLong()} ",
+ " §7(§d${magmaFish} ",
listOf(
- "§6Magmafish: §b${magmaFish.toLong().addSeparators()}",
- "§6Magmafish value: §b${price / magmaFish.toLong()}",
- "§6Magmafish per: §b${magmaFish.toLong() / stored.toLong()}"
+ "§6Magmafish: §b${magmaFish.addSeparators()}",
+ "§6Magmafish value: §b${price / magmaFish}",
+ "§6Magmafish per: §b${magmaFish / stored.toLong()}"
)
)