mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 05:37:27 +08:00
[F] Fix music difficulty unlock conflict
This commit is contained in:
@@ -222,7 +222,8 @@ fun WaccaServer.init() {
|
|||||||
if (recv.isEmpty()) return
|
if (recv.isEmpty()) return
|
||||||
val newItems = mutableListOf<WcUserItem>()
|
val newItems = mutableListOf<WcUserItem>()
|
||||||
recv.forEach { (type, id, param) ->
|
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) {
|
when (type) {
|
||||||
WP() -> { u.wp += param; u.wpTotal += param }
|
WP() -> { u.wp += param; u.wpTotal += param }
|
||||||
XP() -> u.xp += param
|
XP() -> u.xp += param
|
||||||
@@ -306,6 +307,8 @@ fun WaccaServer.init() {
|
|||||||
rating = waccaRating(achievement, pl.levelConst)
|
rating = waccaRating(achievement, pl.levelConst)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// TODO: Update player rating - Best 35 old & 15 new
|
||||||
|
|
||||||
// Re-calculate user total score
|
// Re-calculate user total score
|
||||||
rp.user.save(u.apply { totalScore = rp.bestScore.sumScoreByUser(u) })
|
rp.user.save(u.apply { totalScore = rp.bestScore.sumScoreByUser(u) })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user