Skip to content

Commit

Permalink
注册时设置最后游玩时间
Browse files Browse the repository at this point in the history
  • Loading branch information
zc-meng committed Sep 18, 2024
1 parent e4cc678 commit 1c2e300
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/Statistics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ object Statistics {
}

fun register(name: String): Boolean {
val result = playerInfoMap.putIfAbsent(name, PlayerInfo(name, 0, "", 0, 0, 0, "", 0, 10, 0)) == null
val now = System.currentTimeMillis()
val result = playerInfoMap.putIfAbsent(name, PlayerInfo(name, 0, "", 0, 0, 0, "", now, 10, 0)) == null
if (result) pool.trySend(::savePlayerInfo)
return result
}
Expand Down

0 comments on commit 1c2e300

Please sign in to comment.