aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/slayer
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 03:21:38 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 03:21:38 +0100
commite47a2877bbb0550a1852889e0398f45bc20c0881 (patch)
treeb191552e878d9f00274c4ac987abc7a2696a72c0 /src/main/java/at/hannibal2/skyhanni/features/slayer
parentf142d7f2483247f541a24625af3f5789f3ee1ae6 (diff)
downloadskyhanni-e47a2877bbb0550a1852889e0398f45bc20c0881.tar.gz
skyhanni-e47a2877bbb0550a1852889e0398f45bc20c0881.tar.bz2
skyhanni-e47a2877bbb0550a1852889e0398f45bc20c0881.zip
moved item draw logic from item tracker data to SkyHanni item tracker
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
index d71172eb3..938441d95 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
@@ -14,7 +14,6 @@ import at.hannibal2.skyhanni.events.SlayerQuestCompleteEvent
import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
-import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NumberUtil
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
@@ -170,25 +169,19 @@ object SlayerProfitTracker {
val tracker = getTracker() ?: return@buildList
addAsSingletonList("§e§l$itemLogCategory Profit Tracker")
- var profit = 0.0
- val map = mutableMapOf<Renderable, Long>()
- for ((internalName, itemProfit) in itemLog.items) {
- profit += itemLog.drawItem(tracker, itemProfit, internalName, map)
- }
+ var profit = tracker.drawItems(itemLog, { true }, this)
val slayerSpawnCost = itemLog.slayerSpawnCost
if (slayerSpawnCost != 0L) {
val mobKillCoinsFormat = NumberUtil.format(slayerSpawnCost)
- map[Renderable.hoverTips(
- " §7Slayer Spawn Costs: §c$mobKillCoinsFormat",
- listOf("§7You paid §c$mobKillCoinsFormat §7in total", "§7for starting the slayer quests.")
- )] = slayerSpawnCost
+ addAsSingletonList(
+ Renderable.hoverTips(
+ " §7Slayer Spawn Costs: §c$mobKillCoinsFormat",
+ listOf("§7You paid §c$mobKillCoinsFormat §7in total", "§7for starting the slayer quests.")
+ )
+ )
profit += slayerSpawnCost
}
- for (text in map.sortedDesc().keys) {
- addAsSingletonList(text)
- }
-
val slayerCompletedCount = itemLog.slayerCompletedCount
addAsSingletonList(
Renderable.hoverTips(