aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-11 10:05:39 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-11 10:05:39 +0200
commite992f20bb98a4740f9069e931ec8ab4b1b1bce34 (patch)
tree101987b6add76f73f543bd1af195fc0afa34a452 /src/main/java/at/hannibal2/skyhanni/features
parent025e4d1f4799d980aa73a64ae75cfcded121a9f8 (diff)
downloadskyhanni-e992f20bb98a4740f9069e931ec8ab4b1b1bce34.tar.gz
skyhanni-e992f20bb98a4740f9069e931ec8ab4b1b1bce34.tar.bz2
skyhanni-e992f20bb98a4740f9069e931ec8ab4b1b1bce34.zip
Fixed int limit in sack api + sack display
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt8
1 files changed, 4 insertions, 4 deletions
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 ad9a963e8..92c60bad5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt
@@ -37,7 +37,7 @@ object SackDisplay {
private fun drawDisplay(savingSacks: Boolean): List<List<Any>> {
val newDisplay = mutableListOf<List<Any>>()
- var totalPrice = 0
+ var totalPrice = 0L
var rendered = 0
SackAPI.getSacksData(savingSacks)
@@ -83,7 +83,7 @@ object SackDisplay {
)
if (colorCode == "§a") add(" §c§l(Full!)")
- if (config.showPrice && price != 0) add(" §7(§6${format(price)}§7)")
+ if (config.showPrice && price != 0L) add(" §7(§6${format(price)}§7)")
})
rendered++
}
@@ -137,7 +137,7 @@ object SackDisplay {
add(" ($rough-§a$flawed-§9$fine-§5$flawless)")
val price = (roughprice + flawedprice + fineprice + flawlessprice)
totalPrice += price
- if (config.showPrice && price != 0) add(" §7(§6${format(price)}§7)")
+ if (config.showPrice && price != 0L) add(" §7(§6${format(price)}§7)")
})
}
if (config.showPrice) newDisplay.addAsSingletonList("§eTotal price: §6${format(totalPrice)}")
@@ -145,7 +145,7 @@ object SackDisplay {
return newDisplay
}
- private fun format(price: Int) = if (config.priceFormat == 0) NumberUtil.format(price) else price.addSeparators()
+ private fun format(price: Long) = if (config.priceFormat == 0) NumberUtil.format(price) else price.addSeparators()
private fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled