aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index c4b7fc0a3..6a9d53e15 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -29,7 +29,6 @@ object GardenVisitorDropStatistics {
private var acceptedVisitors = 0
var deniedVisitors = 0
private var totalVisitors = 0
- private var visitorRarities = mutableListOf<Long>()
var coinsSpent = 0L
var lastAccept = 0L
@@ -117,6 +116,7 @@ object GardenVisitorDropStatistics {
private fun setRarities(rarity: String) {
acceptedVisitors += 1
val currentRarity = VisitorRarity.valueOf(rarity)
+ val visitorRarities = GardenAPI.config?.visitorDrops?.visitorRarities ?: return
val temp = visitorRarities[currentRarity.ordinal] + 1
visitorRarities[currentRarity.ordinal] = temp
saveAndUpdate()
@@ -128,6 +128,7 @@ object GardenVisitorDropStatistics {
//1
addAsSingletonList(format(totalVisitors, "Total", "§e", ""))
//2
+ val visitorRarities = hidden.visitorRarities
if (visitorRarities.isNotEmpty()) {
addAsSingletonList(
"§a${visitorRarities[0].addSeparators()}§f-" +
@@ -197,7 +198,6 @@ object GardenVisitorDropStatistics {
hidden.acceptedVisitors = acceptedVisitors
hidden.deniedVisitors = deniedVisitors
totalVisitors = acceptedVisitors + deniedVisitors
- hidden.visitorRarities = visitorRarities
hidden.coinsSpent = coinsSpent
hidden.rewardsCount = rewardsCount
display = formatDisplay(drawDisplay(hidden))
@@ -215,7 +215,6 @@ object GardenVisitorDropStatistics {
acceptedVisitors = hidden.acceptedVisitors
deniedVisitors = hidden.deniedVisitors
totalVisitors = acceptedVisitors + deniedVisitors
- visitorRarities = hidden.visitorRarities
coinsSpent = hidden.coinsSpent
rewardsCount = hidden.rewardsCount
saveAndUpdate()
@@ -243,4 +242,4 @@ object GardenVisitorDropStatistics {
enum class VisitorRarity {
UNCOMMON, RARE, LEGENDARY, SPECIAL,
-} \ No newline at end of file
+}