mirror of https://github.com/hykilpikonna/AquaDX
feat: ✨ symbol chat
parent
8d65952e40
commit
f222632dfb
|
@ -43,6 +43,15 @@ class AquaGameOptions(
|
|||
|
||||
@SettingField("chu3-matching")
|
||||
var chusanMatchingReflector: String = "",
|
||||
|
||||
@SettingField("chu3-matching-chat")
|
||||
var chusanSymbolChat1: Int? = null,
|
||||
@SettingField("chu3-matching-chat")
|
||||
var chusanSymbolChat2: Int? = null,
|
||||
@SettingField("chu3-matching-chat")
|
||||
var chusanSymbolChat3: Int? = null,
|
||||
@SettingField("chu3-matching-chat")
|
||||
var chusanSymbolChat4: Int? = null,
|
||||
|
||||
@SettingField("mai2")
|
||||
var enableMusicRank: Boolean = true,
|
||||
|
|
|
@ -84,7 +84,6 @@ fun ChusanController.chusanInit() {
|
|||
"GetUserRivalData" { """{"userId":"${data["userId"]}","length":"0","userRivalData":[]}""" }
|
||||
"GetUserRegion" { """{"userId":"${data["userId"]}","length":"0","userRegionList":[]}""" }
|
||||
"GetUserPrintedCard" { """{"userId":"${data["userId"]}","length":0,"nextIndex":-1,"userPrintedCardList":[]}""" }
|
||||
"GetUserSymbolChatSetting" { """{"userId":"${data["userId"]}","length":"0","symbolChatInfoList":[]}""" }
|
||||
|
||||
// Net battle data
|
||||
"GetUserNetBattleData" api@ {
|
||||
|
@ -98,6 +97,21 @@ fun ChusanController.chusanInit() {
|
|||
}
|
||||
"GetUserNetBattleRankingInfo" { """{"userId":"${data["userId"]}","length":"0","userNetBattleRankingInfoList":{}}""" }
|
||||
|
||||
"GetUserSymbolChatSetting".paged("symbolChatInfoList") {
|
||||
fun Int.makeSymbols(order: Int) = (1..5).map {
|
||||
mapOf(
|
||||
"sceneId" to it,
|
||||
"symbolChatId" to this,
|
||||
"orderId" to order
|
||||
)
|
||||
}
|
||||
|
||||
db.userData.findByCard_ExtId(uid)()?.card?.aquaUser?.gameOptions?.run {
|
||||
listOf(chusanSymbolChat1, chusanSymbolChat2, chusanSymbolChat3, chusanSymbolChat4)
|
||||
.flatMapIndexed { i, sym -> sym?.makeSymbols(i) ?: empty }
|
||||
} ?: empty
|
||||
}
|
||||
|
||||
// User handlers
|
||||
"GetUserData" {
|
||||
db.userData.findByCard_ExtId(uid)()?.let{ u -> mapOf("userId" to uid, "userData" to u) }
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE aqua_game_options
|
||||
ADD chusan_symbol_chat1 MEDIUMINT NULL,
|
||||
ADD chusan_symbol_chat2 MEDIUMINT NULL,
|
||||
ADD chusan_symbol_chat3 MEDIUMINT NULL,
|
||||
ADD chusan_symbol_chat4 MEDIUMINT NULL;
|
Loading…
Reference in New Issue