mirror of https://github.com/hykilpikonna/AquaDX
[F] Fix music difficulty unlock conflict
parent
26a72244c0
commit
d7fc6f9f49
|
@ -222,7 +222,8 @@ fun WaccaServer.init() {
|
|||
if (recv.isEmpty()) return
|
||||
val newItems = mutableListOf<WcUserItem>()
|
||||
recv.forEach { (type, id, param) ->
|
||||
val ex = items[type]?.get(id)
|
||||
var ex = items[type]?.get(id)
|
||||
if (type == MUSIC_DIFFICULTY_UNLOCK()) ex = ex ?: items[MUSIC_UNLOCK()]?.get(id)
|
||||
when (type) {
|
||||
WP() -> { u.wp += param; u.wpTotal += param }
|
||||
XP() -> u.xp += param
|
||||
|
@ -306,6 +307,8 @@ fun WaccaServer.init() {
|
|||
rating = waccaRating(achievement, pl.levelConst)
|
||||
})
|
||||
|
||||
// TODO: Update player rating - Best 35 old & 15 new
|
||||
|
||||
// Re-calculate user total score
|
||||
rp.user.save(u.apply { totalScore = rp.bestScore.sumScoreByUser(u) })
|
||||
|
||||
|
|
Loading…
Reference in New Issue