mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-07 10:57:26 +08:00
[+] Login Alert for chusan, ongeki and wacca
This commit is contained in:
@@ -7,6 +7,7 @@ import icu.samnyan.aqua.sega.chusan.ChusanData
|
|||||||
import icu.samnyan.aqua.sega.chusan.model.request.UserCMissionResp
|
import icu.samnyan.aqua.sega.chusan.model.request.UserCMissionResp
|
||||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserItem
|
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserItem
|
||||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail
|
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail
|
||||||
|
import icu.samnyan.aqua.sega.general.model.CardStatus
|
||||||
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating
|
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating
|
||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
|
|
||||||
@@ -225,7 +226,7 @@ fun ChusanController.chusanInit() {
|
|||||||
val option = db.userGameOption.findSingleByUser(user)()
|
val option = db.userGameOption.findSingleByUser(user)()
|
||||||
val userDict = user.toJson().jsonMap().filterKeys { it in userPreviewKeys }
|
val userDict = user.toJson().jsonMap().filterKeys { it in userPreviewKeys }
|
||||||
|
|
||||||
mapOf(
|
val res = mutableMapOf(
|
||||||
"userId" to uid, "isLogin" to false, "emoneyBrandId" to 0,
|
"userId" to uid, "isLogin" to false, "emoneyBrandId" to 0,
|
||||||
"lastLoginDate" to user.lastLoginDate, "lastPlayDate" to user.lastPlayDate,
|
"lastLoginDate" to user.lastLoginDate, "lastPlayDate" to user.lastPlayDate,
|
||||||
"userCharacter" to chara,
|
"userCharacter" to chara,
|
||||||
@@ -234,6 +235,14 @@ fun ChusanController.chusanInit() {
|
|||||||
"headphone" to option?.headphone,
|
"headphone" to option?.headphone,
|
||||||
"chargeState" to 1, "userNameEx" to "", "banState" to 0,
|
"chargeState" to 1, "userNameEx" to "", "banState" to 0,
|
||||||
) + userDict
|
) + userDict
|
||||||
|
|
||||||
|
if (user.card?.status == CardStatus.MIGRATED_TO_MINATO) {
|
||||||
|
res["userName"] = "Migrated"
|
||||||
|
res["rating"] = 0
|
||||||
|
res["playerLevel"] = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
"GetUserMusic".paged("userMusicList") {
|
"GetUserMusic".paged("userMusicList") {
|
||||||
@@ -380,6 +389,13 @@ fun ChusanController.chusanInit() {
|
|||||||
// }
|
// }
|
||||||
// process()
|
// process()
|
||||||
|
|
||||||
"""{"returnCode":"1"}"""
|
val user = db.userData.findByCard_ExtId(uid)()
|
||||||
|
|
||||||
|
if (user?.card?.status == CardStatus.MIGRATED_TO_MINATO) {
|
||||||
|
"""{"returnCode":"0"}"""
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
"""{"returnCode":"1"}"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ class OngekiController(
|
|||||||
|
|
||||||
val log = logger()
|
val log = logger()
|
||||||
|
|
||||||
val noopEndpoint = setOf("ExtendLockTimeApi", "GameLoginApi", "GameLogoutApi", "RegisterPromotionCardApi",
|
val noopEndpoint = setOf("ExtendLockTimeApi", "GameLogoutApi", "RegisterPromotionCardApi",
|
||||||
"UpsertClientBookkeepingApi", "UpsertClientDevelopApi", "UpsertClientErrorApi", "UpsertClientSettingApi",
|
"UpsertClientBookkeepingApi", "UpsertClientDevelopApi", "UpsertClientErrorApi", "UpsertClientSettingApi",
|
||||||
"UpsertClientTestmodeApi", "UpsertUserGplogApi", "Ping")
|
"UpsertClientTestmodeApi", "UpsertUserGplogApi", "Ping")
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
package icu.samnyan.aqua.sega.ongeki
|
package icu.samnyan.aqua.sega.ongeki
|
||||||
|
|
||||||
import ext.*
|
import ext.*
|
||||||
|
import icu.samnyan.aqua.sega.general.model.CardStatus
|
||||||
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating
|
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating
|
||||||
import icu.samnyan.aqua.sega.ongeki.model.OgkItemType
|
import icu.samnyan.aqua.sega.ongeki.model.OgkItemType
|
||||||
import icu.samnyan.aqua.sega.ongeki.model.UserItem
|
import icu.samnyan.aqua.sega.ongeki.model.UserItem
|
||||||
@@ -114,7 +115,7 @@ fun OngekiController.initUser() {
|
|||||||
val u = db.data.findByCard_ExtId(uid)() ?: return@api mapOf("userId" to uid, "lastPlayDate" to null)
|
val u = db.data.findByCard_ExtId(uid)() ?: return@api mapOf("userId" to uid, "lastPlayDate" to null)
|
||||||
val o = db.option.findSingleByUser(u)()
|
val o = db.option.findSingleByUser(u)()
|
||||||
|
|
||||||
mapOf(
|
val res = mutableMapOf(
|
||||||
"userId" to uid, "isLogin" to false,
|
"userId" to uid, "isLogin" to false,
|
||||||
|
|
||||||
"userName" to u.userName, "reincarnationNum" to u.reincarnationNum,
|
"userName" to u.userName, "reincarnationNum" to u.reincarnationNum,
|
||||||
@@ -134,6 +135,27 @@ fun OngekiController.initUser() {
|
|||||||
"banStatus" to 0,
|
"banStatus" to 0,
|
||||||
"isWarningConfirmed" to false,
|
"isWarningConfirmed" to false,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (u.card?.status == CardStatus.MIGRATED_TO_MINATO) {
|
||||||
|
res["userName"] = "Migrated"
|
||||||
|
res["level"] = 0
|
||||||
|
res["exp"] = 0
|
||||||
|
res["playerRating"] = 0
|
||||||
|
res["newPlayerRating"] = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
res
|
||||||
|
}
|
||||||
|
|
||||||
|
"GameLogin" {
|
||||||
|
val user = db.data.findByCard_ExtId(uid)()
|
||||||
|
|
||||||
|
if (user?.card?.status == CardStatus.MIGRATED_TO_MINATO) {
|
||||||
|
"""{"returnCode":"0"}"""
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
"""{"returnCode":"1"}"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"GetUserRecentRating".unpaged {
|
"GetUserRecentRating".unpaged {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import icu.samnyan.aqua.net.games.wacca.Wacca
|
|||||||
import icu.samnyan.aqua.net.utils.ApiException
|
import icu.samnyan.aqua.net.utils.ApiException
|
||||||
import icu.samnyan.aqua.net.utils.simpleDescribe
|
import icu.samnyan.aqua.net.utils.simpleDescribe
|
||||||
import icu.samnyan.aqua.sega.general.dao.CardRepository
|
import icu.samnyan.aqua.sega.general.dao.CardRepository
|
||||||
|
import icu.samnyan.aqua.sega.general.model.CardStatus
|
||||||
import icu.samnyan.aqua.sega.wacca.WaccaItemType.*
|
import icu.samnyan.aqua.sega.wacca.WaccaItemType.*
|
||||||
import icu.samnyan.aqua.sega.wacca.WaccaItemType.NOTE_COLOR
|
import icu.samnyan.aqua.sega.wacca.WaccaItemType.NOTE_COLOR
|
||||||
import icu.samnyan.aqua.sega.wacca.WaccaItemType.NOTE_SOUND
|
import icu.samnyan.aqua.sega.wacca.WaccaItemType.NOTE_SOUND
|
||||||
@@ -221,8 +222,14 @@ fun WaccaServer.init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val status = u.lStatus().toMutableList()
|
||||||
|
|
||||||
|
if (u.card?.status == CardStatus.MIGRATED_TO_MINATO) {
|
||||||
|
status[1] = "Migrated"
|
||||||
|
}
|
||||||
|
|
||||||
u.run { ls(
|
u.run { ls(
|
||||||
"0 status" - lStatus(),
|
"0 status" - status,
|
||||||
"1 options" - o.map { (k, v) -> ls(k, v) },
|
"1 options" - o.map { (k, v) -> ls(k, v) },
|
||||||
"2 seasonalPlayModeCounts" - (playCounts.mapIndexed { i, it -> ls(season, i + 1, it) } + ls(ls(0, 1, 1))),
|
"2 seasonalPlayModeCounts" - (playCounts.mapIndexed { i, it -> ls(season, i + 1, it) } + ls(ls(0, 1, 1))),
|
||||||
"3 items" - ls(MUSIC_UNLOCK, TITLE, ICON, TROPHY, SKILL, TICKET, NOTE_COLOR, NOTE_SOUND, NAVIGATOR, USER_PLATE, TOUCH_EFFECT).map {
|
"3 items" - ls(MUSIC_UNLOCK, TITLE, ICON, TROPHY, SKILL, TICKET, NOTE_COLOR, NOTE_SOUND, NAVIGATOR, USER_PLATE, TOUCH_EFFECT).map {
|
||||||
|
|||||||
Reference in New Issue
Block a user