Skip to content

Commit

Permalink
Fix join stack
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieaer committed Apr 29, 2024
1 parent 52f7636 commit 74ddf1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/essentials/Trigger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import java.net.*
import java.nio.ByteBuffer
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.util.*
import java.util.concurrent.TimeUnit
import java.util.function.Consumer
Expand All @@ -45,14 +44,14 @@ object Trigger {
}

if (data.lastLoginDate != null) {
if ((LocalDate.now(ZoneOffset.UTC).toEpochDay() - data.lastLoginDate!!.toEpochDay()) == 1L) {
if ((LocalDate.now().toEpochDay() - data.lastLoginDate!!.toEpochDay()) == 1L) {
data.joinStacks++
when {
data.joinStacks >= 15 -> data.expMultiplier = 5.0
data.joinStacks >= 7 -> data.expMultiplier = 2.5
data.joinStacks >= 3 -> data.expMultiplier = 1.5
}
} else if ((LocalDate.now(ZoneOffset.UTC).toEpochDay() - data.lastLoginDate!!.toEpochDay()) >= 2L) {
} else if ((LocalDate.now().toEpochDay() - data.lastLoginDate!!.toEpochDay()) >= 2L) {
data.joinStacks = 0
}
}
Expand Down

0 comments on commit 74ddf1c

Please sign in to comment.