mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 20:12:39 +00:00
[F] Fix music difficulty unlock conflict
This commit is contained in:
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…
x
Reference in New Issue
Block a user