diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-11 12:42:13 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-11 12:42:13 +0100 |
commit | 8c5e53facf75158bd8b0f4875f71133bf6a365e3 (patch) | |
tree | 999e48fcd0d449c26339ac9ad60abb33839ab016 /src/main/java/at/hannibal2/skyhanni/features/fishing | |
parent | e92fdc4d5e06fd70566f4ec844ecc2625f720a8a (diff) | |
download | skyhanni-8c5e53facf75158bd8b0f4875f71133bf6a365e3.tar.gz skyhanni-8c5e53facf75158bd8b0f4875f71133bf6a365e3.tar.bz2 skyhanni-8c5e53facf75158bd8b0f4875f71133bf6a365e3.zip |
creating function addTotalProfit for item trackers and fixed wrong calculation when zero bosses killed in slayer profit trackers
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt index 979fa845f..1ccac83de 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt @@ -112,14 +112,7 @@ object FishingProfitTracker { ) ) - val profitFormat = profit.addSeparators() - val profitPrefix = if (profit < 0) "§c" else "§6" - - val profitPerCatch = profit / data.totalCatchAmount - val profitPerCatchFormat = NumberUtil.format(profitPerCatch) - - val text = "§eTotal Profit: $profitPrefix$profitFormat coins" - addAsSingletonList(Renderable.hoverTips(text, listOf("§7Profit per catch: $profitPrefix$profitPerCatchFormat"))) + addAsSingletonList(tracker.addTotalProfit(profit, data.totalCatchAmount, "catch")) tracker.addPriceFromButton(this) } |