mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-12-14 11:56:15 +08:00
Compare commits
5 Commits
d0bcf5181c
...
80ba8146df
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80ba8146df | ||
|
|
9bf6ba8de6 | ||
|
|
dd1f1fdb10 | ||
|
|
6b3f1db904 | ||
|
|
fff5dc974a |
@@ -13,18 +13,23 @@ import icu.samnyan.aqua.sega.diva.handler.card.RegistrationHandler
|
||||
import icu.samnyan.aqua.sega.diva.handler.databank.*
|
||||
import icu.samnyan.aqua.sega.diva.handler.ingame.*
|
||||
import icu.samnyan.aqua.sega.diva.handler.user.*
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.boot.GameInitRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.CardProcedureRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.ChangeNameRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.ChangePasswdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.databank.PsRankingRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.*
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.PdUnlockRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.PreStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.SpendCreditRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.StartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BuyCstmzItmRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BuyModuleRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.CardProcedureRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.ChangeNameRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.ChangePasswdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.GetPvPdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.ShopExitRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.StageStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.StoreSsRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.PsRankingRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.PdUnlockRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.PreStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.SpendCreditRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.StartRequest
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaMapper
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
@@ -93,7 +98,7 @@ class DivaController(
|
||||
logger.info("{}: {}", command, body)
|
||||
val respObj = when (command) {
|
||||
"game_init" -> DIVA_INIT
|
||||
"attend" -> attendHandler.handle(mapper.convert(body, GameInitRequest::class.java))
|
||||
"attend" -> attendHandler.handle()
|
||||
"test" -> DIVA_INIT
|
||||
"nv_ranking" -> nvRankingHandler.handle(mapper.convert(body, BaseRequest::class.java))
|
||||
"ps_ranking" -> psRankingHandler.handle(mapper.convert(body, PsRankingRequest::class.java))
|
||||
|
||||
@@ -3,8 +3,22 @@ package icu.samnyan.aqua.sega.diva
|
||||
import ext.invoke
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.*
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.*
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.DivaCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.DivaModule
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Festa
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Pv
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.PvEntry
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayLog
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerInventory
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerModule
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerScreenShot
|
||||
import icu.samnyan.aqua.sega.diva.util.ProfileNotFoundException
|
||||
import icu.samnyan.aqua.sega.diva.util.SessionNotFoundException
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package icu.samnyan.aqua.sega.diva
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerModule
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerModule
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.stereotype.Service
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package icu.samnyan.aqua.sega.diva.handler
|
||||
|
||||
import ext.csv
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.operation.PingResponse
|
||||
import icu.samnyan.aqua.sega.general.dao.PropertyEntryRepository
|
||||
import icu.samnyan.aqua.sega.general.model.PropertyEntry
|
||||
@@ -52,7 +52,7 @@ fun EtcParameter(): String {
|
||||
|
||||
@Component
|
||||
class AttendHandler {
|
||||
fun handle(request: BaseRequest) = mapOf(
|
||||
fun handle() = mapOf(
|
||||
"atnd_prm1" to EtcParameter(),
|
||||
"atnd_prm2" to mapOf(
|
||||
"max_pd_items" to 30, "" to 1, "max_ps_rankings" to 100,
|
||||
|
||||
@@ -3,9 +3,9 @@ package icu.samnyan.aqua.sega.diva.handler.card
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.CardProcedureRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.CardProcedureRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.card.CardProcedureResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.card
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.ChangeNameRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.ChangeNameRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.card.ChangeNameResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package icu.samnyan.aqua.sega.diva.handler.card
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.PassStat
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.ChangePasswdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.ChangePasswdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.card.ChangePasswdResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.card
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.PlayerProfileService
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.card.RegistrationResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.ContestInfoResponse
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
import org.springframework.stereotype.Component
|
||||
@@ -20,7 +20,7 @@ class ContestInfoHandler(val db: DivaRepos) {
|
||||
var ci_str = "***"
|
||||
if (!contestList.isEmpty()) {
|
||||
val sb = StringBuilder()
|
||||
contestList.forEach(Consumer { x: Contest? -> sb.append(encode(x!!.getString())).append(",") })
|
||||
contestList.forEach(Consumer { x: Contest? -> sb.append(encode(x!!.string)).append(",") })
|
||||
sb.append("%2A%2A%2A,".repeat(max(0, 8 - contestList.size)))
|
||||
sb.deleteCharAt(sb.length - 1)
|
||||
ci_str = sb.toString()
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.FestaRepository
|
||||
import icu.samnyan.aqua.sega.diva.model.common.collection.FestaCollection
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.FestaInfoResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.NvRankingResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.common.collection.PsRankingCollection
|
||||
import icu.samnyan.aqua.sega.diva.model.request.databank.PsRankingRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.PsRankingRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.PsRankingResponse
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
import org.springframework.stereotype.Component
|
||||
@@ -60,21 +60,9 @@ class PsRankingHandler(val db: DivaRepos) {
|
||||
score1.add(obj.first.maxScore)
|
||||
score2.add(obj.second.maxScore)
|
||||
score3.add(obj.third.maxScore)
|
||||
name1.add(
|
||||
encode(
|
||||
if (obj.first.pdId != null) obj.first.pdId.playerName else "xxx"
|
||||
)
|
||||
)
|
||||
name2.add(
|
||||
encode(
|
||||
if (obj.second.pdId != null) obj.second.pdId.playerName else "xxx"
|
||||
)
|
||||
)
|
||||
name3.add(
|
||||
encode(
|
||||
if (obj.third.pdId != null) obj.third.pdId.playerName else "xxx"
|
||||
)
|
||||
)
|
||||
name1.add(encode(obj.first.pdId?.playerName ?: "xxx"))
|
||||
name2.add(encode(obj.second.pdId?.playerName ?: "xxx"))
|
||||
name3.add(encode(obj.third.pdId?.playerName ?: "xxx"))
|
||||
}
|
||||
|
||||
return PsRankingResponse(
|
||||
|
||||
@@ -2,8 +2,8 @@ package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.PvEntry
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.PvEntry
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.PvListResponse
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaModuleRepository
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.ShopCatalogResponse
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@@ -3,7 +3,7 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
import ext.invoke
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.BuyCstmzItmRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BuyCstmzItmRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.BuyCstmzItmResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.BuyModuleRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.BuyModuleRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.BuyModuleResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.GetPvPdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.GetPvPdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.GetPvPdResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@@ -3,9 +3,9 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
import ext.csv
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.ShopExitRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.ShopExitRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.ShopExitResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvCustomize
|
||||
import org.springframework.stereotype.Component
|
||||
import java.util.function.Supplier
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
import ext.logger
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.*
|
||||
import icu.samnyan.aqua.sega.diva.model.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.StageResultResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.*
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaCalculator
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.springframework.stereotype.Component
|
||||
@@ -29,13 +29,12 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
val logger = logger()
|
||||
|
||||
fun handle(request: StageResultRequest): Any {
|
||||
if (request.getPd_id() != -1L) {
|
||||
if (request.pd_id != -1L) {
|
||||
val (profile, session) = db.session(request.pd_id)
|
||||
|
||||
currentProfile = profile
|
||||
// Get the last played index
|
||||
request.getStg_ply_pv_id()
|
||||
val stageArr = request.getStg_ply_pv_id()
|
||||
val stageArr = request.stg_ply_pv_id
|
||||
var stageIndex = 0
|
||||
if (stageArr[0] != -1) {
|
||||
stageIndex = 0
|
||||
@@ -63,7 +62,7 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
.orElseGet(Supplier { PlayerPvRecord(profile, log.pvId, log.edition, log.difficulty) })
|
||||
|
||||
// Not save personal record in no fail mode
|
||||
if (request.getGame_type() != 1) {
|
||||
if (request.game_type != 1) {
|
||||
// Only update personal record when using rhythm game option
|
||||
if (log.rhythmGameOptions == "0,0,0") {
|
||||
// Update pvRecord field
|
||||
@@ -101,7 +100,7 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
|
||||
// Calculate reward
|
||||
// Contest reward
|
||||
var contestSpecifier = String.join(",", *request.getCr_sp())
|
||||
var contestSpecifier = String.join(",", *request.cr_sp)
|
||||
val contestRewardType = arrayOf<kotlin.String?>("-1", "-1", "-1")
|
||||
val contestRewardValue = arrayOf<kotlin.String?>("-1", "-1", "-1")
|
||||
val contestRewardString1 = arrayOf<kotlin.String?>("***", "***", "***")
|
||||
@@ -110,9 +109,9 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
var contestEntryRewardValue = -1
|
||||
var contestEntryRewardString1: kotlin.String? = "***"
|
||||
var contestEntryRewardString2: kotlin.String? = "***"
|
||||
val contestId = request.getCr_cid()
|
||||
val contestId = request.cr_cid
|
||||
if (contestId != -1) {
|
||||
val progress = getContestProgress(request.getCr_sp())
|
||||
val progress = getContestProgress(request.cr_sp)
|
||||
contestSpecifier = getContestSpecifier(progress)
|
||||
|
||||
// Check if the contest info exist
|
||||
@@ -202,8 +201,8 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
profile.plateId,
|
||||
session.vp,
|
||||
0,
|
||||
request.getCr_cid(),
|
||||
request.getCr_tv(),
|
||||
request.cr_cid,
|
||||
request.cr_tv,
|
||||
contestSpecifier,
|
||||
String.join(",", *contestRewardType),
|
||||
String.join(",", *contestRewardValue),
|
||||
@@ -242,45 +241,45 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getLog(request: StageResultRequest, profile: PlayerProfile?, i: Int): PlayLog {
|
||||
private fun getLog(request: StageResultRequest, profile: PlayerProfile, i: Int): PlayLog {
|
||||
return PlayLog(
|
||||
profile,
|
||||
request.getStg_ply_pv_id()[i],
|
||||
Difficulty.fromValue(request.getStg_difficulty()[i]),
|
||||
Edition.fromValue(request.getStg_edtn()[i]),
|
||||
request.getStg_scrpt_ver()[i],
|
||||
request.getStg_score()[i],
|
||||
ChallengeKind.fromValue(request.getStg_chllng_kind()[i]),
|
||||
request.getStg_chllng_result()[i],
|
||||
ClearResult.fromValue(request.getStg_clr_kind()[i]),
|
||||
request.getStg_vcld_pts()[i],
|
||||
request.getStg_cool_cnt()[i],
|
||||
request.getStg_cool_pct()[i],
|
||||
request.getStg_fine_cnt()[i],
|
||||
request.getStg_fine_pct()[i],
|
||||
request.getStg_safe_cnt()[i],
|
||||
request.getStg_safe_pct()[i],
|
||||
request.getStg_sad_cnt()[i],
|
||||
request.getStg_sad_pct()[i],
|
||||
request.getStg_wt_wg_cnt()[i],
|
||||
request.getStg_wt_wg_pct()[i],
|
||||
request.getStg_max_cmb()[i],
|
||||
request.getStg_chance_tm()[i],
|
||||
request.getStg_sm_hl()[i],
|
||||
request.getStg_atn_pnt()[i],
|
||||
request.getStg_skin_id()[i],
|
||||
request.getStg_btn_se()[i],
|
||||
request.getStg_btn_se_vol()[i],
|
||||
request.getStg_sld_se()[i],
|
||||
request.getStg_chn_sld_se()[i],
|
||||
request.getStg_sldr_tch_se()[i],
|
||||
slice(request.getStg_mdl_id(), 3, i),
|
||||
request.getStg_cpt_rslt()[i],
|
||||
request.getStg_sld_scr()[i],
|
||||
request.getStg_vcl_chg()[i],
|
||||
slice(request.getStg_c_itm_id(), 12, i),
|
||||
slice(request.getStg_rgo(), 3, i),
|
||||
request.getStg_ss_num()[i],
|
||||
request.stg_ply_pv_id[i],
|
||||
Difficulty.fromValue(request.stg_difficulty[i]),
|
||||
Edition.fromValue(request.stg_edtn[i]),
|
||||
request.stg_scrpt_ver[i],
|
||||
request.stg_score[i],
|
||||
ChallengeKind.fromValue(request.stg_chllng_kind[i]),
|
||||
request.stg_chllng_result[i],
|
||||
ClearResult.fromValue(request.stg_clr_kind[i]),
|
||||
request.stg_vcld_pts[i],
|
||||
request.stg_cool_cnt[i],
|
||||
request.stg_cool_pct[i],
|
||||
request.stg_fine_cnt[i],
|
||||
request.stg_fine_pct[i],
|
||||
request.stg_safe_cnt[i],
|
||||
request.stg_safe_pct[i],
|
||||
request.stg_sad_cnt[i],
|
||||
request.stg_sad_pct[i],
|
||||
request.stg_wt_wg_cnt[i],
|
||||
request.stg_wt_wg_pct[i],
|
||||
request.stg_max_cmb[i],
|
||||
request.stg_chance_tm[i],
|
||||
request.stg_sm_hl[i],
|
||||
request.stg_atn_pnt[i],
|
||||
request.stg_skin_id[i],
|
||||
request.stg_btn_se[i],
|
||||
request.stg_btn_se_vol[i],
|
||||
request.stg_sld_se[i],
|
||||
request.stg_chn_sld_se[i],
|
||||
request.stg_sldr_tch_se[i],
|
||||
slice(request.stg_mdl_id, 3, i),
|
||||
request.stg_cpt_rslt[i],
|
||||
request.stg_sld_scr[i],
|
||||
request.stg_vcl_chg[i],
|
||||
slice(request.stg_c_itm_id, 12, i),
|
||||
slice(request.stg_rgo, 3, i),
|
||||
request.stg_ss_num[i],
|
||||
request.time_stamp.toLocalDateTime()
|
||||
)
|
||||
}
|
||||
@@ -363,9 +362,8 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
} else {
|
||||
db.inventory.save(
|
||||
PlayerInventory(
|
||||
null,
|
||||
currentProfile,
|
||||
rewardValue[1],
|
||||
currentProfile!!,
|
||||
rewardValue[1]!!,
|
||||
"SKIN"
|
||||
)
|
||||
)
|
||||
@@ -387,9 +385,8 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
} else {
|
||||
db.inventory.save(
|
||||
PlayerInventory(
|
||||
null,
|
||||
currentProfile,
|
||||
rewardValue[1],
|
||||
currentProfile!!,
|
||||
rewardValue[1]!!,
|
||||
"PLATE"
|
||||
)
|
||||
)
|
||||
@@ -411,7 +408,7 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
} else {
|
||||
db.customize.save(
|
||||
PlayerCustomize(
|
||||
currentProfile,
|
||||
currentProfile!!,
|
||||
rewardValue[1]!!.toInt()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
|
||||
import ext.emptyMap
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StageStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.StageStartRequest
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
/**
|
||||
@@ -11,10 +11,10 @@ import org.springframework.stereotype.Component
|
||||
@Component
|
||||
class StageStartHandler(val db: DivaRepos) {
|
||||
fun handle(request: StageStartRequest): Any {
|
||||
if (request.getPd_id() != -1L) {
|
||||
if (request.pd_id != -1L) {
|
||||
val (_, session) = db.session(request.pd_id)
|
||||
|
||||
val stageArr = request.getStg_ply_pv_id()
|
||||
val stageArr = request.stg_ply_pv_id
|
||||
var stageIndex = 0
|
||||
if (stageArr[0] != -1) {
|
||||
stageIndex = 0
|
||||
|
||||
@@ -5,8 +5,8 @@ import ext.logger
|
||||
import icu.samnyan.aqua.sega.diva.DIVA_BAD
|
||||
import icu.samnyan.aqua.sega.diva.DIVA_OK
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StoreSsRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerScreenShot
|
||||
import icu.samnyan.aqua.sega.diva.model.StoreSsRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerScreenShot
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.web.multipart.MultipartFile
|
||||
import java.io.IOException
|
||||
|
||||
@@ -6,9 +6,9 @@ import icu.samnyan.aqua.sega.diva.model.common.ContestBorder
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.common.SortMode
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaStringUtils
|
||||
import org.springframework.stereotype.Component
|
||||
import java.lang.String
|
||||
@@ -26,41 +26,41 @@ class EndHandler(val db: DivaRepos) {
|
||||
fun handle(request: StageResultRequest): Any {
|
||||
val (profile, session) = db.session(request.pd_id)
|
||||
|
||||
profile.headphoneVolume = request.getHp_vol()
|
||||
profile.isButtonSeOn = request.isBtn_se_vol
|
||||
profile.buttonSeVolume = request.getBtn_se_vol2()
|
||||
profile.sliderSeVolume = request.getSldr_se_vol2()
|
||||
profile.headphoneVolume = request.hp_vol
|
||||
profile.buttonSeOn = request.btn_se_vol
|
||||
profile.buttonSeVolume = request.btn_se_vol2
|
||||
profile.sliderSeVolume = request.sldr_se_vol2
|
||||
profile.vocaloidPoints = session.vp
|
||||
profile.level = session.levelNumber
|
||||
profile.levelExp = session.levelExp
|
||||
profile.nextPvId = request.getNxt_pv_id()
|
||||
profile.nextDifficulty = Difficulty.fromValue(request.getNxt_dffclty())
|
||||
profile.nextEdition = Edition.fromValue(request.getNxt_edtn())
|
||||
profile.sortMode = SortMode.fromValue(request.getSort_kind())
|
||||
profile.nextPvId = request.nxt_pv_id
|
||||
profile.nextDifficulty = Difficulty.fromValue(request.nxt_dffclty)
|
||||
profile.nextEdition = Edition.fromValue(request.nxt_edtn)
|
||||
profile.sortMode = SortMode.fromValue(request.sort_kind)
|
||||
|
||||
if (request.getCr_cid() != -1) {
|
||||
val contest = db.g.contest.findById(request.getCr_cid()).orElseGet(Supplier { Contest() })
|
||||
val currentResultRank = getContestRank(contest, request.getCr_tv())
|
||||
if (request.getCr_if() == 0) {
|
||||
if (request.cr_cid != -1) {
|
||||
val contest = db.g.contest.findById(request.cr_cid).orElseGet(Supplier { Contest() })
|
||||
val currentResultRank = getContestRank(contest, request.cr_tv)
|
||||
if (request.cr_if == 0) {
|
||||
// Do contest is playing
|
||||
profile.isContestNowPlayingEnable = true
|
||||
profile.contestNowPlayingId = request.getCr_cid()
|
||||
profile.contestNowPlayingEnable = true
|
||||
profile.contestNowPlayingId = request.cr_cid
|
||||
profile.contestNowPlayingResultRank = currentResultRank
|
||||
profile.contestNowPlayingValue = request.getCr_tv()
|
||||
profile.contestNowPlayingSpecifier = String.join(",", *request.getCr_sp())
|
||||
profile.contestNowPlayingValue = request.cr_tv
|
||||
profile.contestNowPlayingSpecifier = String.join(",", *request.cr_sp)
|
||||
} else {
|
||||
val contestRecord =
|
||||
db.contest.findByPdIdAndContestId(profile, request.getCr_cid()).orElseGet(
|
||||
Supplier { PlayerContest(profile, request.getCr_cid()) })
|
||||
db.contest.findByPdIdAndContestId(profile, request.cr_cid).orElseGet(
|
||||
Supplier { PlayerContest(profile, request.cr_cid) })
|
||||
contestRecord.startCount += 1
|
||||
contestRecord.bestValue = max(contestRecord.bestValue, request.getCr_tv())
|
||||
contestRecord.bestValue = max(contestRecord.bestValue, request.cr_tv)
|
||||
contestRecord.resultRank = if (currentResultRank.value > contestRecord.resultRank
|
||||
.value
|
||||
) currentResultRank else contestRecord.resultRank
|
||||
contestRecord.lastUpdateTime = LocalDateTime.now()
|
||||
|
||||
db.contest.save(contestRecord)
|
||||
profile.isContestNowPlayingEnable = false
|
||||
profile.contestNowPlayingEnable = false
|
||||
profile.contestNowPlayingId = -1
|
||||
profile.contestNowPlayingResultRank = ContestBorder.NONE
|
||||
profile.contestNowPlayingValue = -1
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.user
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DIVA_OK
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.PdUnlockRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.PdUnlockRequest
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
|
||||
@@ -5,9 +5,9 @@ import ext.logger
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.PreStartResult
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.PreStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.PreStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.user.PreStartResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package icu.samnyan.aqua.sega.diva.handler.user
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.SpendCreditRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.SpendCreditRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.user.SpendCreditResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ package icu.samnyan.aqua.sega.diva.handler.user
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*
|
||||
import icu.samnyan.aqua.sega.diva.model.common.collection.ClearTally
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.StartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.StartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.user.StartResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.util.PvRecordDataException
|
||||
import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
@@ -32,9 +32,9 @@ class StartHandler(val db: DivaRepos) {
|
||||
|
||||
val contestResult = getContestResult(profile)
|
||||
|
||||
var border = if (profile.isShowGreatBorder) 1 else 0
|
||||
border = border or ((if (profile.isShowExcellentBorder) 1 else 0) shl 1)
|
||||
border = border or ((if (profile.isShowRivalBorder) 1 else 0) shl 2)
|
||||
var border = if (profile.showGreatBorder) 1 else 0
|
||||
border = border or ((if (profile.showExcellentBorder) 1 else 0) shl 1)
|
||||
border = border or ((if (profile.showRivalBorder) 1 else 0) shl 2)
|
||||
|
||||
return StartResponse(
|
||||
profile.pdId,
|
||||
@@ -43,7 +43,7 @@ class StartHandler(val db: DivaRepos) {
|
||||
session.acceptId,
|
||||
profile.playerName,
|
||||
profile.headphoneVolume,
|
||||
profile.isButtonSeOn,
|
||||
profile.buttonSeOn,
|
||||
profile.buttonSeVolume,
|
||||
profile.sliderSeVolume,
|
||||
profile.sortMode,
|
||||
@@ -58,13 +58,13 @@ class StartHandler(val db: DivaRepos) {
|
||||
LocalDateTime.now(),
|
||||
module_have,
|
||||
customize_have,
|
||||
profile.isPreferPerPvModule,
|
||||
profile.isPreferCommonModule,
|
||||
profile.isUsePerPvSkin,
|
||||
profile.isUsePerPvButtonSe,
|
||||
profile.isUsePerPvSliderSe,
|
||||
profile.isUsePerPvChainSliderSe,
|
||||
profile.isUsePerPvTouchSliderSe,
|
||||
profile.preferPerPvModule,
|
||||
profile.preferCommonModule,
|
||||
profile.usePerPvSkin,
|
||||
profile.usePerPvButtonSe,
|
||||
profile.usePerPvSliderSe,
|
||||
profile.usePerPvChainSliderSe,
|
||||
profile.usePerPvTouchSliderSe,
|
||||
profile.vocaloidPoints,
|
||||
profile.nextPvId,
|
||||
profile.nextDifficulty,
|
||||
@@ -74,7 +74,7 @@ class StartHandler(val db: DivaRepos) {
|
||||
contestResult["cv_rr"],
|
||||
contestResult["cv_bv"],
|
||||
contestResult["cv_bf"],
|
||||
if (profile.isContestNowPlayingEnable) profile.contestNowPlayingId else -1,
|
||||
if (profile.contestNowPlayingEnable) profile.contestNowPlayingId else -1,
|
||||
profile.contestNowPlayingValue,
|
||||
profile.contestNowPlayingResultRank,
|
||||
profile.contestNowPlayingSpecifier,
|
||||
@@ -84,10 +84,10 @@ class StartHandler(val db: DivaRepos) {
|
||||
null,
|
||||
null,
|
||||
border.toString(),
|
||||
profile.isShowInterimRanking,
|
||||
profile.isShowClearStatus,
|
||||
profile.showInterimRanking,
|
||||
profile.showClearStatus,
|
||||
countClearStatus(profile),
|
||||
profile.isShowRgoSetting,
|
||||
profile.showRgoSetting,
|
||||
null, // Currently quest not working
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
package icu.samnyan.aqua.sega.diva.model
|
||||
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
/**
|
||||
* Data format from <url>https://dev.s-ul.eu/mikumiku/minime/wikis/home</url>
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
open class BaseRequest {
|
||||
var game_id: String = "" // Game Id
|
||||
var place_id: String = "" // Place Id
|
||||
var time_stamp: ZonedDateTime = ZonedDateTime.now() // Timestamp
|
||||
}
|
||||
|
||||
open class PdRequest : BaseRequest() {
|
||||
var pd_id: Long = 0
|
||||
}
|
||||
|
||||
class StageResultRequest : PdRequest() {
|
||||
var hp_vol: Int = 0
|
||||
var btn_se_vol: Boolean = false
|
||||
var btn_se_vol2: Int = 0
|
||||
var sldr_se_vol2: Int = 0
|
||||
var nxt_pv_id: Int = 0
|
||||
var nxt_dffclty: Int = 0
|
||||
var nxt_edtn: Int = 0
|
||||
var sort_kind: Int = 0
|
||||
var game_type: Int = 0
|
||||
var stg_difficulty: IntArray = intArrayOf()
|
||||
var stg_edtn: IntArray = intArrayOf()
|
||||
var stg_ply_pv_id: IntArray = intArrayOf()
|
||||
var stg_scrpt_ver: IntArray = intArrayOf()
|
||||
var stg_score: IntArray = intArrayOf()
|
||||
var stg_chllng_kind: IntArray = intArrayOf()
|
||||
var stg_chllng_result: IntArray = intArrayOf()
|
||||
var stg_clr_kind: IntArray = intArrayOf()
|
||||
var stg_vcld_pts: IntArray = intArrayOf()
|
||||
var stg_cool_cnt: IntArray = intArrayOf()
|
||||
var stg_cool_pct: IntArray = intArrayOf()
|
||||
var stg_fine_cnt: IntArray = intArrayOf()
|
||||
var stg_fine_pct: IntArray = intArrayOf()
|
||||
var stg_safe_cnt: IntArray = intArrayOf()
|
||||
var stg_safe_pct: IntArray = intArrayOf()
|
||||
var stg_sad_cnt: IntArray = intArrayOf()
|
||||
var stg_sad_pct: IntArray = intArrayOf()
|
||||
var stg_wt_wg_cnt: IntArray = intArrayOf()
|
||||
var stg_wt_wg_pct: IntArray = intArrayOf()
|
||||
|
||||
var stg_max_cmb: IntArray = intArrayOf()
|
||||
var stg_chance_tm: IntArray = intArrayOf()
|
||||
var stg_sm_hl: IntArray = intArrayOf()
|
||||
var stg_atn_pnt: IntArray = intArrayOf()
|
||||
var stg_skin_id: IntArray = intArrayOf()
|
||||
var stg_btn_se: IntArray = intArrayOf()
|
||||
var stg_btn_se_vol: IntArray = intArrayOf()
|
||||
var stg_sld_se: IntArray = intArrayOf()
|
||||
var stg_chn_sld_se: IntArray = intArrayOf()
|
||||
var stg_sldr_tch_se: IntArray = intArrayOf()
|
||||
var stg_mdl_id: IntArray = intArrayOf()
|
||||
var stg_cpt_rslt: IntArray = intArrayOf()
|
||||
var stg_sld_scr: IntArray = intArrayOf()
|
||||
var stg_vcl_chg: IntArray = intArrayOf()
|
||||
var stg_c_itm_id: IntArray = intArrayOf()
|
||||
var stg_rgo: IntArray = intArrayOf()
|
||||
var stg_ss_num: IntArray = intArrayOf()
|
||||
|
||||
var cr_cid: Int = 0
|
||||
var cr_tv: Int = 0
|
||||
var cr_if: Int = 0
|
||||
var cr_sp: Array<String?> = arrayOf()
|
||||
}
|
||||
|
||||
class StageStartRequest : PdRequest() {
|
||||
var stg_ply_pv_id: IntArray = intArrayOf()
|
||||
}
|
||||
|
||||
class StartRequest : PdRequest() {
|
||||
}
|
||||
|
||||
class StoreSsRequest : PdRequest() {
|
||||
var ss_mdl_id: IntArray = intArrayOf()
|
||||
var ss_c_itm_id: IntArray = intArrayOf()
|
||||
}
|
||||
|
||||
class SpendCreditRequest : PdRequest() {
|
||||
}
|
||||
|
||||
class ShopExitRequest : PdRequest() {
|
||||
var use_pv_mdl_eqp = 0
|
||||
var ply_pv_id = 0
|
||||
var mdl_eqp_cmn_ary: IntArray = intArrayOf()
|
||||
var c_itm_eqp_cmn_ary: IntArray = intArrayOf()
|
||||
var ms_itm_flg_cmn_ary: IntArray = intArrayOf()
|
||||
var mdl_eqp_pv_ary: IntArray = intArrayOf()
|
||||
var c_itm_eqp_pv_ary: IntArray = intArrayOf()
|
||||
var ms_itm_flg_pv_ary: IntArray = intArrayOf()
|
||||
}
|
||||
|
||||
class RegistrationRequest : BaseRequest() {
|
||||
var idm: String = ""
|
||||
var aime_id: Long = 0
|
||||
var player_name: String = ""
|
||||
}
|
||||
|
||||
class PsRankingRequest : BaseRequest() {
|
||||
var rnk_ps_pv_id_lst: IntArray = intArrayOf()
|
||||
var rnk_ps_idx = 0
|
||||
}
|
||||
|
||||
class PreStartRequest : BaseRequest() {
|
||||
var idm: String = ""
|
||||
var aime_id: Long = 0
|
||||
}
|
||||
|
||||
class PdUnlockRequest : PdRequest() {
|
||||
}
|
||||
|
||||
class GetPvPdRequest : PdRequest() {
|
||||
var difficulty = 0
|
||||
var pd_pv_id_lst: IntArray = intArrayOf()
|
||||
}
|
||||
|
||||
class ChangePasswdRequest : PdRequest() {
|
||||
var new_passwd: String = ""
|
||||
}
|
||||
|
||||
class ChangeNameRequest : PdRequest() {
|
||||
var player_name: String = ""
|
||||
}
|
||||
|
||||
class CardProcedureRequest : BaseRequest() {
|
||||
var aime_id: Long = 0
|
||||
}
|
||||
|
||||
class BuyModuleRequest : PdRequest() {
|
||||
var mdl_id = 0
|
||||
}
|
||||
|
||||
class BuyCstmzItmRequest : PdRequest() {
|
||||
var cstmz_itm_id = 0
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.common.collection;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Festa;
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Festa;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.common.collection;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvRecord;
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import ext.csv
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestLeague
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestNormaType
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder
|
||||
import jakarta.persistence.*
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaContest")
|
||||
@Table(name = "diva_contest")
|
||||
class Contest : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id = 0
|
||||
var enable = false
|
||||
var startTime: LocalDateTime = LocalDateTime.now()
|
||||
var endTime: LocalDateTime = LocalDateTime.now()
|
||||
var name: String = ""
|
||||
var description: String = ""
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var league: ContestLeague = ContestLeague.BEGINNER
|
||||
var stars = 0
|
||||
var minComplexity = 0 // Only use when Pv difficulty list is not set.
|
||||
var maxComplexity = 0
|
||||
var stages = 0
|
||||
var stageLimit: String = ""
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var normaType: ContestNormaType = ContestNormaType.SCORE
|
||||
var bronzeBorders = 0
|
||||
var sliverBorders = 0
|
||||
var goldBorders = 0
|
||||
|
||||
// Pv List format: "pv_id_start:pv_id_end,pv_id_start:pv_id_end,pv_id_start:pv_id_end" more than 20 group will be ignore, put in -1 for empty end
|
||||
var pvList: String = ""
|
||||
|
||||
// Pv difficulty list format: "pv_difficulty:min_complexity:max_complexity"
|
||||
var pvDiffList: String = ""
|
||||
|
||||
// ContestReward format:
|
||||
// Reward Type: (-1 None, 0 VP, 1 Skin, 2 Callsign, 3 Customize)
|
||||
// Format: "rewardType:reward:string1:string2" string1 and 2 should be urlencoded and must exist. use *** aka %2A%2A%2A as placeholder
|
||||
var bronzeContestReward: String = ""
|
||||
var sliverContestReward: String = ""
|
||||
var goldContestReward: String = ""
|
||||
|
||||
// ContestReward format: "rewardType:reward:string1:string2"
|
||||
var contestEntryReward: String = ""
|
||||
|
||||
constructor()
|
||||
|
||||
val string: String
|
||||
get() {
|
||||
val list = mutableListOf(
|
||||
this.id, // Contest ID
|
||||
DivaTime.format(this.startTime), // Start time
|
||||
DivaTime.format(this.endTime), // End time
|
||||
URIEncoder.encode(this.name), // Contest name
|
||||
URIEncoder.encode(this.description), // Contest description
|
||||
this.league.value, // Contest league
|
||||
this.stars, // Contest starts
|
||||
this.stages, // Contest stage, 1~9
|
||||
this.stageLimit, // list_lump_num ( 0 will be all stage same. > 1 will became stage max defined chart )
|
||||
this.normaType.value,
|
||||
this.bronzeBorders,
|
||||
this.sliverBorders,
|
||||
this.goldBorders
|
||||
)
|
||||
for (i in 1..20) {
|
||||
// format is "pv_range_start,pv_range_end,min_complexity,max_complexity,difficulty,unknown"
|
||||
if (pvList.isBlank() || !pvList.contains(":")) {
|
||||
list += listOf(-1, -1)
|
||||
if (i == 1) {
|
||||
list.add(this.minComplexity)
|
||||
list.add(this.maxComplexity)
|
||||
} else {
|
||||
list.add(-2)
|
||||
list.add(-2)
|
||||
}
|
||||
list += listOf(-1, -2, "7fffffffffffffffffffffffffffffff")
|
||||
} else {
|
||||
val groups = pvList.split(',').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
if (groups.size < i) {
|
||||
list += listOf(-1, -1, -2, -2, -1, -2, "7fffffffffffffffffffffffffffffff")
|
||||
} else {
|
||||
val ids = groups[i - 1].split(':').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
list.add(ids[0])
|
||||
list.add(ids[1])
|
||||
if (StringUtils.isBlank(pvDiffList) || !pvDiffList.contains(":")) {
|
||||
list.add(this.minComplexity)
|
||||
list.add(this.maxComplexity)
|
||||
list.add(-1)
|
||||
} else {
|
||||
val diffList = pvDiffList.split(',').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
if (diffList.size < i) {
|
||||
list.add(this.minComplexity)
|
||||
list.add(this.maxComplexity)
|
||||
list.add(-1)
|
||||
} else {
|
||||
val diff = diffList[i - 1].split(':').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
list.add(diff[1])
|
||||
list.add(diff[2])
|
||||
list.add(diff[0])
|
||||
}
|
||||
}
|
||||
list.add(-2)
|
||||
list.add("7fffffffffffffffffffffffffffffff")
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.csv
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import jakarta.persistence.*
|
||||
|
||||
@Entity(name = "DivaPvLevel")
|
||||
@Table(name = "diva_pv_info_level")
|
||||
class Difficulty {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
var id: Long = 0
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pv_id")
|
||||
var pv: Pv = Pv()
|
||||
var edition = 0
|
||||
var level: String = ""
|
||||
var version = 0
|
||||
var diff: String = ""
|
||||
|
||||
constructor(id: Long, pv: Pv, edition: Int, level: String, version: Int, diff: String) {
|
||||
this.id = id
|
||||
this.pv = pv
|
||||
this.edition = edition
|
||||
this.level = level
|
||||
this.version = version
|
||||
this.diff = diff
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Id
|
||||
import jakarta.persistence.Table
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaCustomize")
|
||||
@Table(name = "diva_customize")
|
||||
class DivaCustomize : Serializable, Internalizable {
|
||||
@Id
|
||||
var id = 0
|
||||
var name: String = ""
|
||||
var price = 0
|
||||
var releaseDate: LocalDateTime = LocalDateTime.now()
|
||||
var endDate: LocalDateTime = LocalDateTime.now()
|
||||
var sortOrder = 0
|
||||
|
||||
override fun toInternal() = "$id,0,${URIEncoder.encode(name)},$price,${DivaTime.format(releaseDate)},${DivaTime.format(endDate)},$sortOrder"
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Id
|
||||
import jakarta.persistence.Table
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaModule")
|
||||
@Table(name = "diva_module")
|
||||
class DivaModule : Serializable, Internalizable {
|
||||
@Id
|
||||
var id = 0
|
||||
var name: String = ""
|
||||
var price = 0
|
||||
var releaseDate: LocalDateTime = LocalDateTime.now()
|
||||
var endDate: LocalDateTime = LocalDateTime.now()
|
||||
var sortOrder = 0
|
||||
|
||||
override fun toInternal() = "$id,0,${URIEncoder.encode(name)},$price,${DivaTime.format(releaseDate)},${DivaTime.format(endDate)},$sortOrder"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.FestaKind
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaFesta")
|
||||
@Table(name = "diva_festa")
|
||||
class Festa : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id = -1
|
||||
var enable = true
|
||||
var name: String = "xxx"
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var kind: FestaKind = FestaKind.PINK_FESTA
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.UNDEFINED
|
||||
var pvList: String = "ALL"
|
||||
var attributes: String = "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
var addVP: Int = 0
|
||||
var vpMultiplier: Int = 1
|
||||
var start: LocalDateTime = LocalDateTime.of(2005, 1, 1, 0, 0)
|
||||
var end: LocalDateTime = LocalDateTime.of(2005, 1, 1, 0, 0)
|
||||
var createDate: LocalDateTime = LocalDateTime.of(2005, 1, 1, 0, 0)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPvInfo")
|
||||
@Table(name = "diva_pv_info")
|
||||
class Pv : Serializable {
|
||||
@Id
|
||||
var pvId: Int = 0
|
||||
var bpm: Int = 0
|
||||
var songName: String = ""
|
||||
var songNameEng: String = ""
|
||||
var songNameReading: String = ""
|
||||
var arranger: String = ""
|
||||
var lyrics: String = ""
|
||||
var music: String = ""
|
||||
var performerNumber: Int = 0
|
||||
|
||||
@OneToMany(cascade = [CascadeType.ALL], fetch = FetchType.LAZY, mappedBy = "pv")
|
||||
@MapKey(name = "diff")
|
||||
var difficulty: MutableMap<String, Difficulty> = mutableMapOf()
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPvEntry")
|
||||
@Table(name = "diva_pv_entry")
|
||||
class PvEntry : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
var pvId = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.NORMAL
|
||||
var version = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var edition: Edition = Edition.ORIGINAL
|
||||
var demoStart: LocalDateTime = LocalDateTime.now()
|
||||
var demoEnd: LocalDateTime = LocalDateTime.now()
|
||||
var playableStart: LocalDateTime = LocalDateTime.now()
|
||||
var playableEnd: LocalDateTime = LocalDateTime.now()
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaGameSession")
|
||||
@Table(name = "diva_game_session")
|
||||
class GameSession : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
var acceptId = 0
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "pd_id", unique = true)
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var startMode: StartMode = StartMode.START
|
||||
var startTime: LocalDateTime = LocalDateTime.now()
|
||||
var lastUpdateTime: LocalDateTime = LocalDateTime.now()
|
||||
var stageIndex: Int = 0
|
||||
var stageResultIndex: Int = 0
|
||||
var lastPvId: Int = 0
|
||||
var levelNumber: Int = 0
|
||||
var levelExp: Int = 0
|
||||
var oldLevelNumber: Int = 0
|
||||
var oldLevelExp: Int = 0
|
||||
var vp: Int = 0
|
||||
|
||||
constructor(
|
||||
acceptId: Int,
|
||||
pdId: PlayerProfile,
|
||||
startMode: StartMode,
|
||||
startTime: LocalDateTime,
|
||||
lastUpdateTime: LocalDateTime,
|
||||
stageIndex: Int,
|
||||
stageResultIndex: Int,
|
||||
lastPvId: Int,
|
||||
levelNumber: Int,
|
||||
levelExp: Int,
|
||||
oldLevelNumber: Int,
|
||||
oldLevelExp: Int,
|
||||
vp: Int
|
||||
) {
|
||||
this.acceptId = acceptId
|
||||
this.pdId = pdId
|
||||
this.startMode = startMode
|
||||
this.startTime = startTime
|
||||
this.lastUpdateTime = lastUpdateTime
|
||||
this.stageIndex = stageIndex
|
||||
this.stageResultIndex = stageResultIndex
|
||||
this.lastPvId = lastPvId
|
||||
this.levelNumber = levelNumber
|
||||
this.levelExp = levelExp
|
||||
this.oldLevelNumber = oldLevelNumber
|
||||
this.oldLevelExp = oldLevelExp
|
||||
this.vp = vp
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPlayLog")
|
||||
@Table(name = "diva_play_log")
|
||||
class PlayLog : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
var pvId = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.NORMAL
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var edition: Edition = Edition.ORIGINAL
|
||||
var scriptVer = 0
|
||||
var score = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var challengeKind: ChallengeKind = ChallengeKind.UNDEFINED
|
||||
var challengeResult = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var clearResult: ClearResult = ClearResult.NO_CLEAR
|
||||
var vp = 0
|
||||
var coolCount = 0
|
||||
var coolPercent = 0
|
||||
var fineCount = 0
|
||||
var finePercent = 0
|
||||
var safeCount = 0
|
||||
var safePercent = 0
|
||||
var sadCount = 0
|
||||
var sadPercent = 0
|
||||
var wrongCount = 0
|
||||
var wrongPercent = 0
|
||||
var maxCombo = 0
|
||||
var chanceTime = 0
|
||||
var holdScore = 0
|
||||
var attainPoint = 0
|
||||
var skinId = 0
|
||||
var buttonSe = 0
|
||||
var buttonSeVol = 0
|
||||
var sliderSe = 0
|
||||
var ChainSlideSe = 0
|
||||
var SliderTouchSe = 0
|
||||
var modules: String = ""
|
||||
var stageCompletion = 0
|
||||
var slideScore = 0
|
||||
var isVocalChange = 0
|
||||
var customizeItems: String = ""
|
||||
|
||||
// String customizeItemFlags;
|
||||
var rhythmGameOptions: String = ""
|
||||
var screenShotCount = -1
|
||||
var dateTime: LocalDateTime = LocalDateTime.now()
|
||||
|
||||
constructor(
|
||||
pdId: PlayerProfile,
|
||||
pvId: Int,
|
||||
difficulty: Difficulty,
|
||||
edition: Edition,
|
||||
scriptVer: Int,
|
||||
score: Int,
|
||||
challengeKind: ChallengeKind,
|
||||
challengeResult: Int,
|
||||
clearResult: ClearResult,
|
||||
vp: Int,
|
||||
coolCount: Int,
|
||||
coolPercent: Int,
|
||||
fineCount: Int,
|
||||
finePercent: Int,
|
||||
safeCount: Int,
|
||||
safePercent: Int,
|
||||
sadCount: Int,
|
||||
sadPercent: Int,
|
||||
wrongCount: Int,
|
||||
wrongPercent: Int,
|
||||
maxCombo: Int,
|
||||
chanceTime: Int,
|
||||
holdScore: Int,
|
||||
attainPoint: Int,
|
||||
skinId: Int,
|
||||
buttonSe: Int,
|
||||
buttonSeVol: Int,
|
||||
sliderSe: Int,
|
||||
chainSlideSe: Int,
|
||||
sliderTouchSe: Int,
|
||||
modules: String,
|
||||
stageCompletion: Int,
|
||||
slideScore: Int,
|
||||
isVocalChange: Int,
|
||||
customizeItems: String,
|
||||
rhythmGameOptions: String,
|
||||
screenShotCount: Int,
|
||||
dateTime: LocalDateTime
|
||||
) {
|
||||
this.pdId = pdId
|
||||
this.pvId = pvId
|
||||
this.difficulty = difficulty
|
||||
this.edition = edition
|
||||
this.scriptVer = scriptVer
|
||||
this.score = score
|
||||
this.challengeKind = challengeKind
|
||||
this.challengeResult = challengeResult
|
||||
this.clearResult = clearResult
|
||||
this.vp = vp
|
||||
this.coolCount = coolCount
|
||||
this.coolPercent = coolPercent
|
||||
this.fineCount = fineCount
|
||||
this.finePercent = finePercent
|
||||
this.safeCount = safeCount
|
||||
this.safePercent = safePercent
|
||||
this.sadCount = sadCount
|
||||
this.sadPercent = sadPercent
|
||||
this.wrongCount = wrongCount
|
||||
this.wrongPercent = wrongPercent
|
||||
this.maxCombo = maxCombo
|
||||
this.chanceTime = chanceTime
|
||||
this.holdScore = holdScore
|
||||
this.attainPoint = attainPoint
|
||||
this.skinId = skinId
|
||||
this.buttonSe = buttonSe
|
||||
this.buttonSeVol = buttonSeVol
|
||||
this.sliderSe = sliderSe
|
||||
ChainSlideSe = chainSlideSe
|
||||
SliderTouchSe = sliderTouchSe
|
||||
this.modules = modules
|
||||
this.stageCompletion = stageCompletion
|
||||
this.slideScore = slideScore
|
||||
this.isVocalChange = isVocalChange
|
||||
this.customizeItems = customizeItems
|
||||
this.rhythmGameOptions = rhythmGameOptions
|
||||
this.screenShotCount = screenShotCount
|
||||
this.dateTime = dateTime
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestBorder
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPlayerContest")
|
||||
@Table(name = "diva_player_contest", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "contest_id"])])
|
||||
class PlayerContest : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "contest_id")
|
||||
var contestId = 0
|
||||
var startCount = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var resultRank: ContestBorder = ContestBorder.NONE
|
||||
var bestValue = -1
|
||||
var flag = -1
|
||||
var lastUpdateTime: LocalDateTime = LocalDateTime.now()
|
||||
|
||||
constructor(pdId: PlayerProfile, contestId: Int) {
|
||||
this.pdId = pdId
|
||||
this.contestId = contestId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerCustomize")
|
||||
@Table(name = "diva_player_customize", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "customize_id"])])
|
||||
class PlayerCustomize : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "customize_id")
|
||||
var customizeId = 0
|
||||
|
||||
constructor(profile: PlayerProfile, customizeId: Int) {
|
||||
this.pdId = profile
|
||||
this.customizeId = customizeId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerInventory")
|
||||
@Table(name = "diva_player_inventory", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "value", "type"])])
|
||||
class PlayerInventory : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
var value: String = ""
|
||||
|
||||
// Type: (1: Skin, 2: Call sign plate, 3: Call sign)
|
||||
var type: String = ""
|
||||
|
||||
constructor(pdId: PlayerProfile, value: String, type: String) {
|
||||
this.pdId = pdId
|
||||
this.value = value
|
||||
this.type = type
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerModule")
|
||||
@Table(name = "diva_player_module", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "module_id"])])
|
||||
class PlayerModule : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "module_id")
|
||||
var moduleId = 0
|
||||
|
||||
constructor(profile: PlayerProfile, moduleId: Int) {
|
||||
this.pdId = profile
|
||||
this.moduleId = moduleId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaStringUtils.getDummyString
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPlayerProfile")
|
||||
@Table(name = "diva_player_profile")
|
||||
class PlayerProfile : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@Column(unique = true)
|
||||
var pdId: Long = 0
|
||||
var playerName: String = "xxx"
|
||||
var vocaloidPoints = 300
|
||||
var level = 1
|
||||
var levelExp = 0
|
||||
var levelTitle: String = "xxx"
|
||||
var plateId = -1
|
||||
var plateEffectId = -1
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var passwordStatus: PassStat = PassStat.MISS
|
||||
|
||||
@JsonIgnore
|
||||
var password: String = "**********"
|
||||
|
||||
/**
|
||||
* Game play customize
|
||||
*/
|
||||
var preferPerPvModule = true
|
||||
var preferCommonModule = false
|
||||
var usePerPvSkin = false
|
||||
var usePerPvButtonSe = false
|
||||
var usePerPvSliderSe = false
|
||||
var usePerPvChainSliderSe = false
|
||||
var usePerPvTouchSliderSe = false
|
||||
var commonModule: String = "-999,-999,-999"
|
||||
var commonCustomizeItems: String = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999"
|
||||
var commonModuleSetTime: LocalDateTime = LocalDateTime.now()
|
||||
var moduleSelectItemFlag: String = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
|
||||
// -1 is disable
|
||||
var commonSkin = -1
|
||||
|
||||
/**
|
||||
* Sound Setting
|
||||
*/
|
||||
var headphoneVolume = 100
|
||||
var buttonSeOn = true
|
||||
var buttonSeVolume = 100
|
||||
var sliderSeVolume = 100
|
||||
var buttonSe = -1
|
||||
var chainSlideSe = -1
|
||||
var slideSe = -1
|
||||
var sliderTouchSe = -1
|
||||
|
||||
/**
|
||||
* View Setting
|
||||
*/
|
||||
@Enumerated(EnumType.STRING)
|
||||
var sortMode: SortMode = SortMode.RELEASE_DATE
|
||||
|
||||
@JsonIgnore
|
||||
var nextPvId = -1
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
var nextDifficulty: Difficulty = Difficulty.NORMAL
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
var nextEdition: Edition = Edition.ORIGINAL
|
||||
var showInterimRanking = true
|
||||
var showClearStatus = true
|
||||
var showGreatBorder = true
|
||||
var showExcellentBorder = true
|
||||
var showRivalBorder = true
|
||||
var showRgoSetting = true
|
||||
|
||||
@JsonIgnore
|
||||
var contestNowPlayingEnable = false
|
||||
|
||||
@JsonIgnore
|
||||
var contestNowPlayingId = -1
|
||||
|
||||
// Contest now playing progress
|
||||
@JsonIgnore
|
||||
var contestNowPlayingValue = -1
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
var contestNowPlayingResultRank: ContestBorder = ContestBorder.NONE
|
||||
|
||||
// This store the current progress of contest
|
||||
@JsonIgnore
|
||||
var contestNowPlayingSpecifier: String = ""
|
||||
|
||||
|
||||
/**
|
||||
* MyList, comma separate string
|
||||
*/
|
||||
var myList0: String = getDummyString("-1", 40)
|
||||
var myList1: String = getDummyString("-1", 40)
|
||||
var myList2: String = getDummyString("-1", 40)
|
||||
|
||||
@JsonIgnore
|
||||
var rivalPdId: Long = -1
|
||||
|
||||
constructor(pdId: Long, playerName: String) {
|
||||
this.pdId = pdId
|
||||
this.playerName = playerName
|
||||
}
|
||||
|
||||
constructor(
|
||||
id: Long,
|
||||
pdId: Long,
|
||||
playerName: String,
|
||||
vocaloidPoints: Int,
|
||||
level: Int,
|
||||
levelExp: Int,
|
||||
levelTitle: String,
|
||||
plateId: Int,
|
||||
plateEffectId: Int,
|
||||
passwordStatus: PassStat,
|
||||
password: String,
|
||||
preferPerPvModule: Boolean,
|
||||
preferCommonModule: Boolean,
|
||||
usePerPvSkin: Boolean,
|
||||
usePerPvButtonSe: Boolean,
|
||||
usePerPvSliderSe: Boolean,
|
||||
usePerPvChainSliderSe: Boolean,
|
||||
usePerPvTouchSliderSe: Boolean,
|
||||
commonModule: String,
|
||||
commonCustomizeItems: String,
|
||||
commonModuleSetTime: LocalDateTime,
|
||||
moduleSelectItemFlag: String,
|
||||
commonSkin: Int,
|
||||
headphoneVolume: Int,
|
||||
buttonSeOn: Boolean,
|
||||
buttonSeVolume: Int,
|
||||
sliderSeVolume: Int,
|
||||
buttonSe: Int,
|
||||
chainSlideSe: Int,
|
||||
slideSe: Int,
|
||||
sliderTouchSe: Int,
|
||||
sortMode: SortMode,
|
||||
nextPvId: Int,
|
||||
nextDifficulty: Difficulty,
|
||||
nextEdition: Edition,
|
||||
showInterimRanking: Boolean,
|
||||
showClearStatus: Boolean,
|
||||
showGreatBorder: Boolean,
|
||||
showExcellentBorder: Boolean,
|
||||
showRivalBorder: Boolean,
|
||||
showRgoSetting: Boolean,
|
||||
contestNowPlayingEnable: Boolean,
|
||||
contestNowPlayingId: Int,
|
||||
contestNowPlayingValue: Int,
|
||||
contestNowPlayingResultRank: ContestBorder,
|
||||
contestNowPlayingSpecifier: String,
|
||||
myList0: String,
|
||||
myList1: String,
|
||||
myList2: String,
|
||||
rivalPdId: Long
|
||||
) {
|
||||
this.id = id
|
||||
this.pdId = pdId
|
||||
this.playerName = playerName
|
||||
this.vocaloidPoints = vocaloidPoints
|
||||
this.level = level
|
||||
this.levelExp = levelExp
|
||||
this.levelTitle = levelTitle
|
||||
this.plateId = plateId
|
||||
this.plateEffectId = plateEffectId
|
||||
this.passwordStatus = passwordStatus
|
||||
this.password = password
|
||||
this.preferPerPvModule = preferPerPvModule
|
||||
this.preferCommonModule = preferCommonModule
|
||||
this.usePerPvSkin = usePerPvSkin
|
||||
this.usePerPvButtonSe = usePerPvButtonSe
|
||||
this.usePerPvSliderSe = usePerPvSliderSe
|
||||
this.usePerPvChainSliderSe = usePerPvChainSliderSe
|
||||
this.usePerPvTouchSliderSe = usePerPvTouchSliderSe
|
||||
this.commonModule = commonModule
|
||||
this.commonCustomizeItems = commonCustomizeItems
|
||||
this.commonModuleSetTime = commonModuleSetTime
|
||||
this.moduleSelectItemFlag = moduleSelectItemFlag
|
||||
this.commonSkin = commonSkin
|
||||
this.headphoneVolume = headphoneVolume
|
||||
this.buttonSeOn = buttonSeOn
|
||||
this.buttonSeVolume = buttonSeVolume
|
||||
this.sliderSeVolume = sliderSeVolume
|
||||
this.buttonSe = buttonSe
|
||||
this.chainSlideSe = chainSlideSe
|
||||
this.slideSe = slideSe
|
||||
this.sliderTouchSe = sliderTouchSe
|
||||
this.sortMode = sortMode
|
||||
this.nextPvId = nextPvId
|
||||
this.nextDifficulty = nextDifficulty
|
||||
this.nextEdition = nextEdition
|
||||
this.showInterimRanking = showInterimRanking
|
||||
this.showClearStatus = showClearStatus
|
||||
this.showGreatBorder = showGreatBorder
|
||||
this.showExcellentBorder = showExcellentBorder
|
||||
this.showRivalBorder = showRivalBorder
|
||||
this.showRgoSetting = showRgoSetting
|
||||
this.contestNowPlayingEnable = contestNowPlayingEnable
|
||||
this.contestNowPlayingId = contestNowPlayingId
|
||||
this.contestNowPlayingValue = contestNowPlayingValue
|
||||
this.contestNowPlayingResultRank = contestNowPlayingResultRank
|
||||
this.contestNowPlayingSpecifier = contestNowPlayingSpecifier
|
||||
this.myList0 = myList0
|
||||
this.myList1 = myList1
|
||||
this.myList2 = myList2
|
||||
this.rivalPdId = rivalPdId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerPvCustomize")
|
||||
@Table(name = "diva_player_pv_customize", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "pv_id"])])
|
||||
class PlayerPvCustomize : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "pv_id")
|
||||
var pvId = -1
|
||||
var module: String = "-999,-999,-999"
|
||||
var customize: String = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999"
|
||||
var customizeFlag: String = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
var skin = -1
|
||||
var buttonSe = -1
|
||||
var slideSe = -1
|
||||
var chainSlideSe = -1
|
||||
var sliderTouchSe = -1
|
||||
|
||||
constructor(pdId: PlayerProfile, pvId: Int) {
|
||||
this.pdId = pdId
|
||||
this.pvId = pvId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerPvRecord")
|
||||
@Table(
|
||||
name = "diva_player_pv_record",
|
||||
uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "pv_id", "edition", "difficulty"])]
|
||||
)
|
||||
class PlayerPvRecord : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "pv_id")
|
||||
var pvId = -1
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var edition: Edition = Edition.ORIGINAL
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.NORMAL
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var result: ClearResult = ClearResult.NO_CLEAR
|
||||
var maxScore = -1
|
||||
var maxAttain = -1
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var challengeKind: ChallengeKind = ChallengeKind.UNDEFINED
|
||||
var rgoPurchased: String = "0,0,0"
|
||||
var rgoPlayed: String = "0,0,0"
|
||||
|
||||
constructor(pvId: Int, edition: Edition) {
|
||||
this.pvId = pvId
|
||||
this.edition = edition
|
||||
}
|
||||
|
||||
constructor(pdId: PlayerProfile, pvId: Int, edition: Edition, difficulty: Difficulty) {
|
||||
this.pdId = pdId
|
||||
this.pvId = pvId
|
||||
this.edition = edition
|
||||
this.difficulty = difficulty
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import jakarta.persistence.*
|
||||
|
||||
@Entity(name = "DivaPlayerScreenShot")
|
||||
@Table(name = "diva_player_screen_shot")
|
||||
class PlayerScreenShot {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
var pvId: Long = 0
|
||||
var fileName: String = ""
|
||||
var moduleList: String = ""
|
||||
var customizeList: String = ""
|
||||
|
||||
constructor(pdId: PlayerProfile, fileName: String, pvId: Long, moduleList: String, customizeList: String) {
|
||||
this.pdId = pdId
|
||||
this.fileName = fileName
|
||||
this.pvId = pvId
|
||||
this.moduleList = moduleList
|
||||
this.customizeList = customizeList
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestLeague;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestNormaType;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaContest")
|
||||
@Table(name = "diva_contest")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Contest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
private boolean enable;
|
||||
|
||||
private LocalDateTime startTime;
|
||||
|
||||
private LocalDateTime endTime;
|
||||
|
||||
private String name;
|
||||
|
||||
private String description;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestLeague league;
|
||||
|
||||
private int stars;
|
||||
|
||||
private int minComplexity; // Only use when Pv difficulty list is not set.
|
||||
|
||||
private int maxComplexity;
|
||||
|
||||
private int stages;
|
||||
|
||||
private String stageLimit;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestNormaType normaType;
|
||||
|
||||
private int bronzeBorders = 0;
|
||||
|
||||
private int sliverBorders = 0;
|
||||
|
||||
private int goldBorders = 0;
|
||||
|
||||
// Pv List format: "pv_id_start:pv_id_end,pv_id_start:pv_id_end,pv_id_start:pv_id_end" more than 20 group will be ignore, put in -1 for empty end
|
||||
private String pvList;
|
||||
|
||||
// Pv difficulty list format: "pv_difficulty:min_complexity:max_complexity"
|
||||
private String pvDiffList;
|
||||
|
||||
// ContestReward format:
|
||||
// Reward Type: (-1 None, 0 VP, 1 Skin, 2 Callsign, 3 Customize)
|
||||
// Format: "rewardType:reward:string1:string2" string1 and 2 should be urlencoded and must exist. use *** aka %2A%2A%2A as placeholder
|
||||
private String bronzeContestReward;
|
||||
|
||||
private String sliverContestReward;
|
||||
|
||||
private String goldContestReward;
|
||||
|
||||
// ContestReward format: "rewardType:reward:string1:string2"
|
||||
private String contestEntryReward;
|
||||
|
||||
public String getString() {
|
||||
List<Object> list = new LinkedList<>();
|
||||
list.add(this.id); // Contest ID
|
||||
list.add(DivaTime.format(this.startTime)); // Start time
|
||||
list.add(DivaTime.format(this.endTime)); // End time
|
||||
list.add(URIEncoder.encode(this.name)); // Contest name
|
||||
list.add(URIEncoder.encode(this.description)); // Contest description
|
||||
list.add(this.league.getValue()); // Contest league
|
||||
list.add(this.stars); // Contest starts
|
||||
list.add(this.stages); // Contest stage, 1~9
|
||||
list.add(this.stageLimit); // list_lump_num ( 0 will be all stage same. > 1 will became stage max defined chart? )
|
||||
list.add(this.normaType.getValue());
|
||||
list.add(this.bronzeBorders);
|
||||
list.add(this.sliverBorders);
|
||||
list.add(this.goldBorders);
|
||||
for (int i = 1; i <= 20; i++) {
|
||||
// format is "pv_range_start,pv_range_end,min_complexity,max_complexity,difficulty,unknown"
|
||||
if (StringUtils.isBlank(pvList) || !pvList.contains(":")) {
|
||||
list.add(-1);
|
||||
list.add(-1);
|
||||
if (i == 1) {
|
||||
list.add(this.minComplexity);
|
||||
list.add(this.maxComplexity);
|
||||
} else {
|
||||
list.add(-2);
|
||||
list.add(-2);
|
||||
}
|
||||
list.add(-1);
|
||||
list.add(-2);
|
||||
list.add("7fffffffffffffffffffffffffffffff");
|
||||
} else {
|
||||
String[] groups = pvList.split(",");
|
||||
if (groups.length < i) {
|
||||
list.add(-1);
|
||||
list.add(-1);
|
||||
list.add(-2);
|
||||
list.add(-2);
|
||||
list.add(-1);
|
||||
list.add(-2);
|
||||
list.add("7fffffffffffffffffffffffffffffff");
|
||||
} else {
|
||||
String[] ids = groups[i - 1].split(":");
|
||||
list.add(ids[0]);
|
||||
list.add(ids[1]);
|
||||
if (StringUtils.isBlank(pvDiffList) || !pvDiffList.contains(":")) {
|
||||
list.add(this.minComplexity);
|
||||
list.add(this.maxComplexity);
|
||||
list.add(-1);
|
||||
} else {
|
||||
String[] diffList = pvDiffList.split(",");
|
||||
if (diffList.length < i) {
|
||||
list.add(this.minComplexity);
|
||||
list.add(this.maxComplexity);
|
||||
list.add(-1);
|
||||
} else {
|
||||
String[] diff = diffList[i - 1].split(":");
|
||||
list.add(diff[1]);
|
||||
list.add(diff[2]);
|
||||
list.add(diff[0]);
|
||||
}
|
||||
}
|
||||
list.add(-2);
|
||||
list.add("7fffffffffffffffffffffffffffffff");
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPvLevel")
|
||||
@Table(name = "diva_pv_info_level")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Difficulty {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pv_id")
|
||||
private Pv pv;
|
||||
|
||||
private int edition;
|
||||
|
||||
private String level;
|
||||
|
||||
private int version;
|
||||
|
||||
private String diff;
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaCustomize")
|
||||
@Table(name = "diva_customize")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DivaCustomize implements Serializable, Internalizable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
|
||||
private int price;
|
||||
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private int sortOrder;
|
||||
|
||||
@Override
|
||||
public String toInternal() {
|
||||
return id + ",0," +
|
||||
URIEncoder.encode(name) + "," +
|
||||
price + "," +
|
||||
DivaTime.format(releaseDate) + "," +
|
||||
DivaTime.format(endDate) + "," +
|
||||
sortOrder;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaModule")
|
||||
@Table(name = "diva_module")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DivaModule implements Serializable, Internalizable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
|
||||
private int price;
|
||||
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private int sortOrder;
|
||||
|
||||
@Override
|
||||
public String toInternal() {
|
||||
return id + ",0," +
|
||||
URIEncoder.encode(name) + "," +
|
||||
price + "," +
|
||||
DivaTime.format(releaseDate) + "," +
|
||||
DivaTime.format(endDate) + "," +
|
||||
sortOrder;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.FestaKind;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaFesta")
|
||||
@Table(name = "diva_festa")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Festa implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id = -1;
|
||||
|
||||
private boolean enable = true;
|
||||
|
||||
private String name = "xxx";
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FestaKind kind = FestaKind.PINK_FESTA;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty = Difficulty.UNDEFINED;
|
||||
|
||||
private String pvList = "ALL";
|
||||
|
||||
private String attributes = "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
|
||||
|
||||
private Integer addVP = 0;
|
||||
|
||||
private Integer vpMultiplier = 1;
|
||||
|
||||
private LocalDateTime start = LocalDateTime.of(2005, 1, 1, 0, 0);
|
||||
|
||||
private LocalDateTime end = LocalDateTime.of(2005, 1, 1, 0, 0);
|
||||
|
||||
private LocalDateTime createDate = LocalDateTime.of(2005, 1, 1, 0, 0);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPvInfo")
|
||||
@Table(name = "diva_pv_info")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Pv implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private Integer pvId;
|
||||
|
||||
private Integer bpm;
|
||||
|
||||
private String songName;
|
||||
|
||||
private String songNameEng;
|
||||
|
||||
private String songNameReading;
|
||||
|
||||
private String arranger;
|
||||
|
||||
private String lyrics;
|
||||
|
||||
private String music;
|
||||
|
||||
private Integer performerNumber;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pv")
|
||||
@MapKey(name = "diff")
|
||||
private Map<String, Difficulty> difficulty;
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPvEntry")
|
||||
@Table(name = "diva_pv_entry")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PvEntry implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
private int pvId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty;
|
||||
|
||||
private int version;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition edition;
|
||||
|
||||
private LocalDateTime demoStart;
|
||||
|
||||
private LocalDateTime demoEnd;
|
||||
|
||||
private LocalDateTime playableStart;
|
||||
|
||||
private LocalDateTime playableEnd;
|
||||
|
||||
public PvEntry(int pvId, Difficulty difficulty, int version, Edition edition, LocalDateTime demoStart, LocalDateTime demoEnd, LocalDateTime playableStart, LocalDateTime playableEnd) {
|
||||
this.pvId = pvId;
|
||||
this.difficulty = difficulty;
|
||||
this.version = version;
|
||||
this.edition = edition;
|
||||
this.demoStart = demoStart;
|
||||
this.demoEnd = demoEnd;
|
||||
this.playableStart = playableStart;
|
||||
this.playableEnd = playableEnd;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
/**
|
||||
* Data format from <url>https://dev.s-ul.eu/mikumiku/minime/wikis/home</url>
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BaseRequest {
|
||||
private String cmd; // Command
|
||||
private String req_id; // Request Id
|
||||
private String game_id; // Game Id
|
||||
private String r_ver; // Game Version
|
||||
private String kc_serial; // KeyChip Serial
|
||||
private String b_serial; // Board Serial
|
||||
private String place_id; // Place Id
|
||||
private ZonedDateTime time_stamp;
|
||||
private String start_up_mode; // Satellite mode, as on dipsw#1, 0 is SUB and 1 is MAIN
|
||||
private String cmm_dly_mod;
|
||||
private String cmm_dly_sec;
|
||||
private String cmm_err_mod;
|
||||
private String country_code;
|
||||
private String region_code;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FormRequest {
|
||||
private String query;
|
||||
private MultipartFile bin;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.boot;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <url>https://dev.s-ul.eu/mikumiku/minime/wikis/Command/attend</url>
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AttendRequest extends BaseRequest {
|
||||
public String atnd_lut; // Date-Time of last attend state update
|
||||
public String atnd_prm1; // Etc. Parameter, only 14 are used, but array of 100 int
|
||||
public String atnd_prm2; // Game balance parameter, only 89 are used of 100
|
||||
public String atnd_prm3; // Dispersal parameter, only 6 used of 100
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.boot;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class GameInitRequest extends BaseRequest {
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.card;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CardProcedureRequest extends BaseRequest {
|
||||
private int cd_adm_cmd;
|
||||
private String a_code;
|
||||
private long aime_id;
|
||||
private String aime_a_code;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.card;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChangeNameRequest extends BaseRequest {
|
||||
private String a_code;
|
||||
private long aime_id;
|
||||
private String aime_a_code;
|
||||
private long pd_id;
|
||||
private int accept_idx;
|
||||
private String player_name;
|
||||
private int chg_name_price;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.card;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChangePasswdRequest extends BaseRequest {
|
||||
private String a_code;
|
||||
private long aime_id;
|
||||
private String aime_a_code;
|
||||
private long pd_id;
|
||||
private int accept_idx;
|
||||
private String new_passwd;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.card;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RegistrationRequest extends BaseRequest {
|
||||
private String pmm;
|
||||
private String idm;
|
||||
private String mmgameid;
|
||||
private String mmuid;
|
||||
private String a_code;
|
||||
private long aime_id;
|
||||
private String aime_a_code;
|
||||
private String key_obj_type;
|
||||
private String player_name;
|
||||
private String passwd;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.databank;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PsRankingRequest extends BaseRequest {
|
||||
private int[] rnk_ps_pv_id_lst;
|
||||
private int rnk_ps_idx;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BuyCstmzItmRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private int accept_idx;
|
||||
private int start_idx;
|
||||
private int cstmz_itm_id;
|
||||
private int cstmz_itm_price;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BuyModuleRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private int accept_idx;
|
||||
private int start_idx;
|
||||
private int mdl_id;
|
||||
private int mdl_price;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GetPvPdRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private int difficulty;
|
||||
private int[] pd_pv_id_lst;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ShopExitRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private int accept_idx;
|
||||
private int start_idx;
|
||||
private int use_pv_mdl_eqp;
|
||||
private int ply_pv_id;
|
||||
private int[] mdl_eqp_cmn_ary;
|
||||
private int[] c_itm_eqp_cmn_ary;
|
||||
private int[] ms_itm_flg_cmn_ary;
|
||||
private int[] mdl_eqp_pv_ary;
|
||||
private int[] c_itm_eqp_pv_ary;
|
||||
private int[] ms_itm_flg_pv_ary;
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class StageResultRequest extends BaseRequest {
|
||||
public long pd_id;
|
||||
public int accept_idx;
|
||||
public int start_idx;
|
||||
public int hp_vol;
|
||||
public boolean btn_se_vol;
|
||||
public int btn_se_vol2;
|
||||
public int sldr_se_vol2;
|
||||
public boolean use_pv_mdl_eqp;
|
||||
public int vcld_pts;
|
||||
public int nxt_pv_id;
|
||||
public int nxt_dffclty;
|
||||
public int nxt_edtn;
|
||||
public int sort_kind;
|
||||
public int nblss_ltt_stts;
|
||||
public int nblss_ltt_tckt;
|
||||
public int[] my_qst_id;
|
||||
public int[] my_qst_sts;
|
||||
public boolean free_play;
|
||||
public int game_type;
|
||||
public int[] stg_difficulty;
|
||||
public int[] stg_edtn;
|
||||
public int[] stg_ply_pv_id;
|
||||
public int[] stg_sel_pv_id;
|
||||
public int[] stg_scrpt_ver;
|
||||
public int[] stg_score;
|
||||
public int[] stg_chllng_kind;
|
||||
public int[] stg_chllng_result;
|
||||
public int[] stg_clr_kind;
|
||||
public int[] stg_vcld_pts;
|
||||
public int[] stg_cool_cnt;
|
||||
public int[] stg_cool_pct;
|
||||
public int[] stg_fine_cnt;
|
||||
public int[] stg_fine_pct;
|
||||
public int[] stg_safe_cnt;
|
||||
public int[] stg_safe_pct;
|
||||
public int[] stg_sad_cnt;
|
||||
public int[] stg_sad_pct;
|
||||
public int[] stg_wt_wg_cnt;
|
||||
public int[] stg_wt_wg_pct;
|
||||
|
||||
public int[] stg_max_cmb;
|
||||
public int[] stg_chance_tm;
|
||||
public int[] stg_sm_hl;
|
||||
public int[] stg_atn_pnt;
|
||||
public int[] stg_skin_id;
|
||||
public int[] stg_btn_se;
|
||||
public int[] stg_btn_se_vol;
|
||||
public int[] stg_sld_se;
|
||||
public int[] stg_chn_sld_se;
|
||||
public int[] stg_sldr_tch_se;
|
||||
public int[] stg_mdl_id;
|
||||
public int[] stg_sel_mdl_id;
|
||||
public int[] stg_rvl_pd_id;
|
||||
public int[] stg_rvl_wl;
|
||||
public int[] stg_cpt_rslt;
|
||||
public int[] stg_sld_scr;
|
||||
public int[] stg_is_sr_gm;
|
||||
public int[] stg_pv_brnch_rslt;
|
||||
public int[] stg_vcl_chg;
|
||||
public int[] stg_c_itm_id;
|
||||
public int[] stg_ms_itm_flg;
|
||||
public int[] stg_rgo;
|
||||
public int[] stg_ss_num;
|
||||
public int[] stg_is_cs_scs;
|
||||
public int[] stg_is_nppg_use;
|
||||
public int[] stg_p_std_lo_id;
|
||||
public int[] stg_p_std_is_to;
|
||||
public int[] stg_p_std_is_ccu;
|
||||
public int[] stg_p_std_is_tiu;
|
||||
public int[] stg_p_std_is_iu;
|
||||
public int[] stg_p_std_is_npu;
|
||||
public int[] stg_p_std_is_du;
|
||||
|
||||
public int ply_pv_id;
|
||||
|
||||
public int ttl_vp_add;
|
||||
public int ttl_vp_sub;
|
||||
|
||||
public int continue_cnt;
|
||||
public int[] gu_cmd;
|
||||
|
||||
public int[] mdl_eqp_cmn_ary;
|
||||
public int[] c_itm_eqp_cmn_ary;
|
||||
public int[] ms_itm_flg_cmn_ary;
|
||||
public int[] mdl_eqp_pv_ary;
|
||||
public int[] c_itm_eqp_pv_ary;
|
||||
public int[] ms_itm_flg_pv_ary;
|
||||
public int[] stg_mdl_s_sts;
|
||||
|
||||
public int cr_cid;
|
||||
public int cr_sc;
|
||||
public int cr_tv;
|
||||
public int cr_if;
|
||||
public String[] cr_sp;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class StageStartRequest extends BaseRequest {
|
||||
public long pd_id;
|
||||
public int accept_idx;
|
||||
public int start_idx;
|
||||
public boolean free_play;
|
||||
public int game_type;
|
||||
public int[] stg_difficulty;
|
||||
public int[] stg_edtn;
|
||||
public int[] stg_ply_pv_id;
|
||||
public int[] stg_sel_pv_id; //
|
||||
public int[] stg_scrpt_ver;
|
||||
|
||||
public int[] stg_skin_id;
|
||||
public int[] stg_btn_se;
|
||||
public int[] stg_btn_se_vol;
|
||||
public int[] stg_sld_se;
|
||||
public int[] stg_chn_sld_se;
|
||||
public int[] stg_sldr_tch_se;
|
||||
public int[] stg_mdl_id;
|
||||
public int[] stg_sel_mdl_id;
|
||||
public int[] stg_rvl_pd_id;
|
||||
public int[] stg_c_itm_id;
|
||||
public int[] stg_ms_itm_flg;
|
||||
public int[] stg_rgo;
|
||||
public int[] stg_ss_num;
|
||||
public int[] stg_is_cs_scs;
|
||||
|
||||
public int continue_cnt;
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.ingame;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class StoreSsRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private String ss_dat_id;
|
||||
private int ss_pv_id;
|
||||
private int ss_sel_pv_id;
|
||||
private int[] ss_mdl_id;
|
||||
private int[] ss_sel_mdl_id;
|
||||
private int[] ss_c_itm_id;
|
||||
private int[] ss_pxl_sz;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.user;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PdUnlockRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private int accept_idx;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.user;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PreStartRequest extends BaseRequest {
|
||||
private String pmm;
|
||||
private String idm;
|
||||
private String mmgameid;
|
||||
private String mmuid;
|
||||
private String a_code;
|
||||
private long aime_id;
|
||||
private String aime_a_code;
|
||||
private String key_obj_type;
|
||||
private boolean exec_vu;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.user;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SpendCreditRequest extends BaseRequest {
|
||||
private long pd_id;
|
||||
private int[] my_qst_id;
|
||||
private int[] my_qst_sts;
|
||||
private int crdt_typ;
|
||||
private int[] cmpgn_id;
|
||||
private int[] cmpgn_pb;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.request.user;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class StartRequest extends BaseRequest {
|
||||
public long pd_id;
|
||||
public int accept_idx;
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaGameSession")
|
||||
@Table(name = "diva_game_session")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GameSession implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
private int acceptId;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "pd_id", unique = true)
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private StartMode startMode;
|
||||
|
||||
private LocalDateTime startTime;
|
||||
|
||||
private LocalDateTime lastUpdateTime;
|
||||
|
||||
private Integer stageIndex;
|
||||
|
||||
private Integer stageResultIndex;
|
||||
|
||||
private Integer lastPvId;
|
||||
|
||||
private Integer levelNumber;
|
||||
|
||||
private Integer levelExp;
|
||||
|
||||
private Integer oldLevelNumber;
|
||||
|
||||
private Integer oldLevelExp;
|
||||
|
||||
private Integer vp;
|
||||
|
||||
public GameSession(int acceptId, PlayerProfile pdId, StartMode startMode, LocalDateTime startTime, LocalDateTime lastUpdateTime, Integer stageIndex, Integer stageResultIndex, Integer lastPvId, Integer levelNumber, Integer levelExp, Integer oldLevelNumber, Integer oldLevelExp, Integer vp) {
|
||||
this.acceptId = acceptId;
|
||||
this.pdId = pdId;
|
||||
this.startMode = startMode;
|
||||
this.startTime = startTime;
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
this.stageIndex = stageIndex;
|
||||
this.stageResultIndex = stageResultIndex;
|
||||
this.lastPvId = lastPvId;
|
||||
this.levelNumber = levelNumber;
|
||||
this.levelExp = levelExp;
|
||||
this.oldLevelNumber = oldLevelNumber;
|
||||
this.oldLevelExp = oldLevelExp;
|
||||
this.vp = vp;
|
||||
}
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayLog")
|
||||
@Table(name = "diva_play_log")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlayLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
private int pvId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition edition;
|
||||
|
||||
private int scriptVer;
|
||||
|
||||
private int score;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ChallengeKind challengeKind;
|
||||
|
||||
private int challengeResult;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ClearResult clearResult;
|
||||
|
||||
private int vp;
|
||||
|
||||
private int coolCount;
|
||||
|
||||
private int coolPercent;
|
||||
|
||||
private int fineCount;
|
||||
|
||||
private int finePercent;
|
||||
|
||||
private int safeCount;
|
||||
|
||||
private int safePercent;
|
||||
|
||||
private int sadCount;
|
||||
|
||||
private int sadPercent;
|
||||
|
||||
private int wrongCount;
|
||||
|
||||
private int wrongPercent;
|
||||
|
||||
private int maxCombo;
|
||||
|
||||
private int chanceTime;
|
||||
|
||||
private int holdScore;
|
||||
|
||||
private int attainPoint;
|
||||
|
||||
private int skinId;
|
||||
|
||||
private int buttonSe;
|
||||
|
||||
private int buttonSeVol;
|
||||
|
||||
private int sliderSe;
|
||||
|
||||
private int ChainSlideSe;
|
||||
|
||||
private int SliderTouchSe;
|
||||
|
||||
private String modules;
|
||||
|
||||
private int stageCompletion;
|
||||
|
||||
private int slideScore;
|
||||
|
||||
private int isVocalChange;
|
||||
|
||||
private String customizeItems;
|
||||
|
||||
// private String customizeItemFlags;
|
||||
|
||||
private String rhythmGameOptions;
|
||||
|
||||
private int screenShotCount = -1;
|
||||
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
public PlayLog(PlayerProfile pdId, int pvId, Difficulty difficulty, Edition edition, int scriptVer, int score, ChallengeKind challengeKind, int challengeResult, ClearResult clearResult, int vp, int coolCount, int coolPercent, int fineCount, int finePercent, int safeCount, int safePercent, int sadCount, int sadPercent, int wrongCount, int wrongPercent, int maxCombo, int chanceTime, int holdScore, int attainPoint, int skinId, int buttonSe, int buttonSeVol, int sliderSe, int chainSlideSe, int sliderTouchSe, String modules, int stageCompletion, int slideScore, int isVocalChange, String customizeItems, String rhythmGameOptions, int screenShotCount, LocalDateTime dateTime) {
|
||||
this.pdId = pdId;
|
||||
this.pvId = pvId;
|
||||
this.difficulty = difficulty;
|
||||
this.edition = edition;
|
||||
this.scriptVer = scriptVer;
|
||||
this.score = score;
|
||||
this.challengeKind = challengeKind;
|
||||
this.challengeResult = challengeResult;
|
||||
this.clearResult = clearResult;
|
||||
this.vp = vp;
|
||||
this.coolCount = coolCount;
|
||||
this.coolPercent = coolPercent;
|
||||
this.fineCount = fineCount;
|
||||
this.finePercent = finePercent;
|
||||
this.safeCount = safeCount;
|
||||
this.safePercent = safePercent;
|
||||
this.sadCount = sadCount;
|
||||
this.sadPercent = sadPercent;
|
||||
this.wrongCount = wrongCount;
|
||||
this.wrongPercent = wrongPercent;
|
||||
this.maxCombo = maxCombo;
|
||||
this.chanceTime = chanceTime;
|
||||
this.holdScore = holdScore;
|
||||
this.attainPoint = attainPoint;
|
||||
this.skinId = skinId;
|
||||
this.buttonSe = buttonSe;
|
||||
this.buttonSeVol = buttonSeVol;
|
||||
this.sliderSe = sliderSe;
|
||||
ChainSlideSe = chainSlideSe;
|
||||
SliderTouchSe = sliderTouchSe;
|
||||
this.modules = modules;
|
||||
this.stageCompletion = stageCompletion;
|
||||
this.slideScore = slideScore;
|
||||
this.isVocalChange = isVocalChange;
|
||||
this.customizeItems = customizeItems;
|
||||
this.rhythmGameOptions = rhythmGameOptions;
|
||||
this.screenShotCount = screenShotCount;
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestBorder;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerContest")
|
||||
@Table(name = "diva_player_contest", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "contest_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerContest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "contest_id")
|
||||
private int contestId;
|
||||
|
||||
private int startCount = 0;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestBorder resultRank = ContestBorder.NONE;
|
||||
|
||||
private int bestValue = -1;
|
||||
|
||||
private int flag = -1;
|
||||
|
||||
private LocalDateTime lastUpdateTime = LocalDateTime.now();
|
||||
|
||||
public PlayerContest(PlayerProfile pdId, int contestId) {
|
||||
this.pdId = pdId;
|
||||
this.contestId = contestId;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerCustomize")
|
||||
@Table(name = "diva_player_customize", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "customize_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerCustomize implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "customize_id")
|
||||
private int customizeId;
|
||||
|
||||
public PlayerCustomize(PlayerProfile profile, int customizeId) {
|
||||
this.pdId = profile;
|
||||
this.customizeId = customizeId;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerInventory")
|
||||
@Table(name = "diva_player_inventory", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "value", "type"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerInventory implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
private String value;
|
||||
|
||||
// Type: (1: Skin, 2: Call sign plate, 3: Call sign)
|
||||
private String type;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerModule")
|
||||
@Table(name = "diva_player_module", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "module_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerModule implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "module_id")
|
||||
private int moduleId;
|
||||
|
||||
public PlayerModule(PlayerProfile profile, int moduleId) {
|
||||
this.pdId = profile;
|
||||
this.moduleId = moduleId;
|
||||
}
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static icu.samnyan.aqua.sega.diva.util.DivaStringUtils.getDummyString;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerProfile")
|
||||
@Table(name = "diva_player_profile")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerProfile implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@Column(unique = true)
|
||||
private long pdId;
|
||||
|
||||
private String playerName = "xxx";
|
||||
|
||||
private int vocaloidPoints = 300;
|
||||
|
||||
private int level = 1;
|
||||
|
||||
private int levelExp = 0;
|
||||
|
||||
private String levelTitle = "xxx";
|
||||
|
||||
private int plateId = -1;
|
||||
|
||||
private int plateEffectId = -1;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PassStat passwordStatus = PassStat.MISS;
|
||||
|
||||
@JsonIgnore
|
||||
private String password = "**********";
|
||||
|
||||
/**
|
||||
* Game play customize
|
||||
*/
|
||||
private boolean preferPerPvModule = true;
|
||||
|
||||
private boolean preferCommonModule = false;
|
||||
|
||||
private boolean usePerPvSkin = false;
|
||||
|
||||
private boolean usePerPvButtonSe = false;
|
||||
|
||||
private boolean usePerPvSliderSe = false;
|
||||
|
||||
private boolean usePerPvChainSliderSe = false;
|
||||
|
||||
private boolean usePerPvTouchSliderSe = false;
|
||||
|
||||
private String commonModule = "-999,-999,-999";
|
||||
|
||||
private String commonCustomizeItems = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999";
|
||||
|
||||
private LocalDateTime commonModuleSetTime = LocalDateTime.now();
|
||||
|
||||
private String moduleSelectItemFlag = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
|
||||
|
||||
// -1 is disable
|
||||
private int commonSkin = -1;
|
||||
|
||||
/**
|
||||
* Sound Setting
|
||||
*/
|
||||
private int headphoneVolume = 100;
|
||||
|
||||
private boolean buttonSeOn = true;
|
||||
|
||||
private int buttonSeVolume = 100;
|
||||
|
||||
private int sliderSeVolume = 100;
|
||||
|
||||
private int buttonSe = -1;
|
||||
|
||||
private int chainSlideSe = -1;
|
||||
|
||||
private int slideSe = -1;
|
||||
|
||||
private int sliderTouchSe = -1;
|
||||
|
||||
/**
|
||||
* View Setting
|
||||
*/
|
||||
@Enumerated(EnumType.STRING)
|
||||
private SortMode sortMode = SortMode.RELEASE_DATE;
|
||||
|
||||
@JsonIgnore
|
||||
private int nextPvId = -1;
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty nextDifficulty = Difficulty.NORMAL;
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition nextEdition = Edition.ORIGINAL;
|
||||
|
||||
private boolean showInterimRanking = true;
|
||||
|
||||
private boolean showClearStatus = true;
|
||||
|
||||
private boolean showGreatBorder = true;
|
||||
|
||||
private boolean showExcellentBorder = true;
|
||||
|
||||
private boolean showRivalBorder = true;
|
||||
|
||||
private boolean showRgoSetting = true;
|
||||
|
||||
@JsonIgnore
|
||||
private boolean contestNowPlayingEnable = false;
|
||||
|
||||
@JsonIgnore
|
||||
private int contestNowPlayingId = -1;
|
||||
|
||||
// Contest now playing progress
|
||||
@JsonIgnore
|
||||
private int contestNowPlayingValue = -1;
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestBorder contestNowPlayingResultRank = ContestBorder.NONE;
|
||||
|
||||
// This store the current progress of contest
|
||||
@JsonIgnore
|
||||
private String contestNowPlayingSpecifier = "";
|
||||
|
||||
|
||||
/**
|
||||
* MyList, comma separate string
|
||||
*/
|
||||
private String myList0 = getDummyString("-1", 40);
|
||||
|
||||
private String myList1 = getDummyString("-1", 40);
|
||||
|
||||
private String myList2 = getDummyString("-1", 40);
|
||||
|
||||
@JsonIgnore
|
||||
private long rivalPdId = -1;
|
||||
|
||||
public PlayerProfile(long pdId, String playerName) {
|
||||
this.pdId = pdId;
|
||||
this.playerName = playerName;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerPvCustomize")
|
||||
@Table(name = "diva_player_pv_customize", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "pv_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerPvCustomize implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "pv_id")
|
||||
private int pvId = -1;
|
||||
|
||||
private String module = "-999,-999,-999";
|
||||
|
||||
private String customize = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999";
|
||||
|
||||
private String customizeFlag = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
|
||||
|
||||
private int skin = -1;
|
||||
|
||||
private int buttonSe = -1;
|
||||
|
||||
private int slideSe = -1;
|
||||
|
||||
private int chainSlideSe = -1;
|
||||
|
||||
private int sliderTouchSe = -1;
|
||||
|
||||
public PlayerPvCustomize(PlayerProfile pdId, int pvId) {
|
||||
this.pdId = pdId;
|
||||
this.pvId = pvId;
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerPvRecord")
|
||||
@Table(name = "diva_player_pv_record", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "pv_id", "edition", "difficulty"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerPvRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "pv_id")
|
||||
private int pvId = -1;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition edition = Edition.ORIGINAL;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty = Difficulty.NORMAL;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ClearResult result = ClearResult.NO_CLEAR;
|
||||
|
||||
private int maxScore = -1;
|
||||
|
||||
private int maxAttain = -1;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ChallengeKind challengeKind = ChallengeKind.UNDEFINED;
|
||||
|
||||
private String rgoPurchased = "0,0,0";
|
||||
|
||||
private String rgoPlayed = "0,0,0";
|
||||
|
||||
public PlayerPvRecord(int pvId, Edition edition) {
|
||||
this.pvId = pvId;
|
||||
this.edition = edition;
|
||||
}
|
||||
|
||||
public PlayerPvRecord(PlayerProfile pdId, int pvId, Edition edition, Difficulty difficulty) {
|
||||
this.pdId = pdId;
|
||||
this.pvId = pvId;
|
||||
this.edition = edition;
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerScreenShot")
|
||||
@Table(name = "diva_player_screen_shot")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlayerScreenShot {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
private long pvId;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String moduleList;
|
||||
|
||||
private String customizeList;
|
||||
|
||||
public PlayerScreenShot(PlayerProfile pdId, String fileName, long pvId, String moduleList, String customizeList) {
|
||||
this.pdId = pdId;
|
||||
this.fileName = fileName;
|
||||
this.pvId = pvId;
|
||||
this.moduleList = moduleList;
|
||||
this.customizeList = customizeList;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.ser.std.StdSerializer
|
||||
import icu.samnyan.aqua.sega.diva.PlayerPvRecordRepository
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.common.LevelInfo
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import org.springframework.stereotype.Component
|
||||
import java.net.URLEncoder
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
Reference in New Issue
Block a user