mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Use the system update countdown for the daily restart
This commit is contained in:
parent
9054e36288
commit
e216a6366f
1 changed files with 6 additions and 0 deletions
|
|
@ -66,12 +66,18 @@ class MajorUpdateWorker {
|
|||
|
||||
ServerStore.clearDailyEntries()
|
||||
if (ServerConstants.DAILY_RESTART) {
|
||||
for (player in Repository.players.filter { !it.isArtificial }) {
|
||||
player.packetDispatch.sendSystemUpdate(500)
|
||||
}
|
||||
Repository.sendNews(colorize("%RSERVER GOING DOWN FOR DAILY RESTART IN 5 MINUTES!"))
|
||||
ServerConstants.DAILY_RESTART = false
|
||||
submitWorldPulse(object : Pulse(100) {
|
||||
var counter = 0
|
||||
override fun pulse(): Boolean {
|
||||
counter++
|
||||
for (player in Repository.players.filter { !it.isArtificial }) {
|
||||
player.packetDispatch.sendSystemUpdate((5 - counter) * 100)
|
||||
}
|
||||
if (counter == 5) {
|
||||
exitProcess(0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue