forked from Hay1tsme/artemis
Compare commits
13 Commits
6965132e5b
...
2a290f2a3d
Author | SHA1 | Date | |
---|---|---|---|
2a290f2a3d | |||
b21ddb92ce | |||
ac8a660e13 | |||
12fd663eb7 | |||
dfd3877889 | |||
62b62db5b5 | |||
188be2dfc1 | |||
6ff8c4d931 | |||
401623f20b | |||
5a388e2a24 | |||
3a234244d4 | |||
44c75d0156 | |||
78b2a81c79 |
@ -95,6 +95,7 @@ class AllnetServlet:
|
||||
|
||||
self.logger.debug(f"Allnet request: {vars(req)}")
|
||||
if req.game_id not in self.uri_registry:
|
||||
if not self.config.server.is_develop:
|
||||
msg = f"Unrecognised game {req.game_id} attempted allnet auth from {request_ip}."
|
||||
self.data.base.log_event(
|
||||
"allnet", "ALLNET_AUTH_UNKNOWN_GAME", logging.WARN, msg
|
||||
@ -104,6 +105,12 @@ class AllnetServlet:
|
||||
resp.stat = 0
|
||||
return self.dict_to_http_form_string([vars(resp)])
|
||||
|
||||
else:
|
||||
self.logger.info(f"Allowed unknown game {req.game_id} v{req.ver} to authenticate from {request_ip} due to 'is_develop' being enabled. S/N: {req.serial}")
|
||||
resp.uri = f"http://{self.config.title.hostname}:{self.config.title.port}/{req.game_id}/{req.ver.replace('.', '')}/"
|
||||
resp.host = f"{self.config.title.hostname}:{self.config.title.port}"
|
||||
return self.dict_to_http_form_string([vars(resp)])
|
||||
|
||||
resp.uri, resp.host = self.uri_registry[req.game_id]
|
||||
|
||||
machine = self.data.arcade.get_machine(req.serial)
|
||||
|
@ -145,16 +145,40 @@ class Data:
|
||||
)
|
||||
return
|
||||
|
||||
if action == "upgrade":
|
||||
for x in range(old_ver, version):
|
||||
if not os.path.exists(
|
||||
f"core/data/schema/versions/{game.upper()}_{version}_{action}.sql"
|
||||
f"core/data/schema/versions/{game.upper()}_{x + 1}_{action}.sql"
|
||||
):
|
||||
self.logger.error(
|
||||
f"Could not find {action} script {game.upper()}_{version}_{action}.sql in core/data/schema/versions folder"
|
||||
f"Could not find {action} script {game.upper()}_{x + 1}_{action}.sql in core/data/schema/versions folder"
|
||||
)
|
||||
return
|
||||
|
||||
with open(
|
||||
f"core/data/schema/versions/{game.upper()}_{version}_{action}.sql",
|
||||
f"core/data/schema/versions/{game.upper()}_{x + 1}_{action}.sql",
|
||||
"r",
|
||||
encoding="utf-8",
|
||||
) as f:
|
||||
sql = f.read()
|
||||
|
||||
result = self.base.execute(sql)
|
||||
if result is None:
|
||||
self.logger.error("Error execuing sql script!")
|
||||
return None
|
||||
|
||||
else:
|
||||
for x in range(old_ver, version, -1):
|
||||
if not os.path.exists(
|
||||
f"core/data/schema/versions/{game.upper()}_{x - 1}_{action}.sql"
|
||||
):
|
||||
self.logger.error(
|
||||
f"Could not find {action} script {game.upper()}_{x - 1}_{action}.sql in core/data/schema/versions folder"
|
||||
)
|
||||
return
|
||||
|
||||
with open(
|
||||
f"core/data/schema/versions/{game.upper()}_{x - 1}_{action}.sql",
|
||||
"r",
|
||||
encoding="utf-8",
|
||||
) as f:
|
||||
@ -237,3 +261,19 @@ class Data:
|
||||
if not cards:
|
||||
self.logger.info(f"Delete hanging user {user['id']}")
|
||||
self.user.delete_user(user["id"])
|
||||
|
||||
def autoupgrade(self) -> None:
|
||||
all_games = self.base.get_all_schema_vers()
|
||||
if all_games is None:
|
||||
self.logger.warn("Failed to get schema versions")
|
||||
|
||||
for x in all_games:
|
||||
game = x["game"].upper()
|
||||
update_ver = 1
|
||||
for y in range(2, 100):
|
||||
if os.path.exists(f"core/data/schema/versions/{game}_{y}_upgrade.sql"):
|
||||
update_ver = y
|
||||
else:
|
||||
break
|
||||
|
||||
self.migrate_database(game, update_ver, "upgrade")
|
@ -2,6 +2,7 @@ import json
|
||||
import logging
|
||||
from random import randrange
|
||||
from typing import Any, Optional, Dict, List
|
||||
from sqlalchemy.engine import Row
|
||||
from sqlalchemy.engine.cursor import CursorResult
|
||||
from sqlalchemy.engine.base import Connection
|
||||
from sqlalchemy.sql import text, func, select
|
||||
@ -81,6 +82,14 @@ class BaseData:
|
||||
"""
|
||||
return randrange(10000, 9999999)
|
||||
|
||||
def get_all_schema_vers(self) -> Optional[List[Row]]:
|
||||
sql = select(schema_ver)
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
return None
|
||||
return result.fetchall()
|
||||
|
||||
def get_schema_ver(self, game: str) -> Optional[int]:
|
||||
sql = select(schema_ver).where(schema_ver.c.game == game)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
ALTER TABLE diva_score DROP COLUMN edition;
|
||||
ALTER TABLE diva_playlog DROP COLUMN edition;
|
||||
|
||||
ALTER TABLE diva_score DROP FOREIGN KEY diva_score_ibfk_1;
|
||||
ALTER TABLE diva_score DROP CONSTRAINT diva_score_uk;
|
||||
ALTER TABLE diva_score ADD CONSTRAINT diva_score_uk UNIQUE (user, pv_id, difficulty);
|
||||
ALTER TABLE diva_score ADD CONSTRAINT diva_score_ibfk_1 FOREIGN KEY (user) REFERENCES aime_user(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE diva_score DROP COLUMN edition;
|
||||
ALTER TABLE diva_playlog DROP COLUMN edition;
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
21
core/data/schema/versions/SDEZ_2_rollback.sql
Normal file
21
core/data/schema/versions/SDEZ_2_rollback.sql
Normal file
@ -0,0 +1,21 @@
|
||||
ALTER TABLE mai2_item_card
|
||||
CHANGE COLUMN cardId card_id INT NOT NULL AFTER user,
|
||||
CHANGE COLUMN cardTypeId card_kind INT NOT NULL,
|
||||
CHANGE COLUMN charaId chara_id INT NOT NULL,
|
||||
CHANGE COLUMN mapId map_id INT NOT NULL,
|
||||
CHANGE COLUMN startDate start_date TIMESTAMP NULL DEFAULT '2018-01-01 00:00:00',
|
||||
CHANGE COLUMN endDate end_date TIMESTAMP NULL DEFAULT '2038-01-01 00:00:00';
|
||||
|
||||
ALTER TABLE mai2_item_item
|
||||
CHANGE COLUMN itemId item_id INT NOT NULL AFTER user,
|
||||
CHANGE COLUMN itemKind item_kind INT NOT NULL,
|
||||
CHANGE COLUMN isValid is_valid TINYINT(1) NOT NULL DEFAULT '1';
|
||||
|
||||
ALTER TABLE mai2_item_character
|
||||
CHANGE COLUMN characterId character_id INT NOT NULL,
|
||||
CHANGE COLUMN useCount use_count INT NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE mai2_item_charge
|
||||
CHANGE COLUMN chargeId charge_id INT NOT NULL,
|
||||
CHANGE COLUMN purchaseDate purchase_date TIMESTAMP NOT NULL,
|
||||
CHANGE COLUMN validDate valid_date TIMESTAMP NOT NULL;
|
@ -3,8 +3,8 @@ CHANGE COLUMN card_id cardId INT NOT NULL AFTER user,
|
||||
CHANGE COLUMN card_kind cardTypeId INT NOT NULL,
|
||||
CHANGE COLUMN chara_id charaId INT NOT NULL,
|
||||
CHANGE COLUMN map_id mapId INT NOT NULL,
|
||||
CHANGE COLUMN startDate startDate TIMESTAMP NULL DEFAULT '2018-01-01 00:00:00',
|
||||
CHANGE COLUMN endDate endDate TIMESTAMP NULL DEFAULT '2038-01-01 00:00:00';
|
||||
CHANGE COLUMN start_date startDate TIMESTAMP NULL DEFAULT '2018-01-01 00:00:00',
|
||||
CHANGE COLUMN end_date endDate TIMESTAMP NULL DEFAULT '2038-01-01 00:00:00';
|
||||
|
||||
ALTER TABLE mai2_item_item
|
||||
CHANGE COLUMN item_id itemId INT NOT NULL AFTER user,
|
||||
|
@ -64,6 +64,9 @@ if __name__ == "__main__":
|
||||
else:
|
||||
data.migrate_database(args.game, int(args.version), args.action)
|
||||
|
||||
elif args.action == "autoupgrade":
|
||||
data.autoupgrade()
|
||||
|
||||
elif args.action == "create-owner":
|
||||
data.create_owner(args.email)
|
||||
|
||||
|
@ -8,13 +8,13 @@ using the megaime database. Clean installations always create the latest databas
|
||||
|
||||
# Table of content
|
||||
|
||||
- [Supported Games](#Supported-Games)
|
||||
- [Chunithm](#Chunithm)
|
||||
- [crossbeats REV.](#crossbeats-REV)
|
||||
- [maimai DX](#maimai-DX)
|
||||
- [O.N.G.E.K.I.](#ONGEKI)
|
||||
- [Card Maker](#Card-Maker)
|
||||
- [WACCA](#WACCA)
|
||||
- [Supported Games](#supported-games)
|
||||
- [Chunithm](#chunithm)
|
||||
- [crossbeats REV.](#crossbeats-rev)
|
||||
- [maimai DX](#maimai-dx)
|
||||
- [O.N.G.E.K.I.](#o-n-g-e-k-i)
|
||||
- [Card Maker](#card-maker)
|
||||
- [WACCA](#wacca)
|
||||
|
||||
|
||||
# Supported Games
|
||||
|
@ -2,5 +2,16 @@ server:
|
||||
enable: True
|
||||
loglevel: "info"
|
||||
|
||||
team:
|
||||
name: ARTEMiS
|
||||
|
||||
version:
|
||||
"11":
|
||||
rom: 2.00.00
|
||||
data: 2.00.00
|
||||
"12":
|
||||
rom: 2.05.00
|
||||
data: 2.05.00
|
||||
|
||||
crypto:
|
||||
encrypted_only: False
|
@ -7,4 +7,4 @@ index = ChuniServlet
|
||||
database = ChuniData
|
||||
reader = ChuniReader
|
||||
game_codes = [ChuniConstants.GAME_CODE, ChuniConstants.GAME_CODE_NEW]
|
||||
current_schema_version = 1
|
||||
current_schema_version = 3
|
||||
|
@ -130,7 +130,7 @@ class ChuniBase:
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
"length": len(activity_list),
|
||||
"kind": data["kind"],
|
||||
"kind": int(data["kind"]),
|
||||
"userActivityList": activity_list,
|
||||
}
|
||||
|
||||
@ -451,13 +451,13 @@ class ChuniBase:
|
||||
"playerLevel": profile["playerLevel"],
|
||||
"rating": profile["rating"],
|
||||
"headphone": profile["headphone"],
|
||||
"chargeState": "1",
|
||||
"chargeState": 1,
|
||||
"userNameEx": profile["userName"],
|
||||
}
|
||||
|
||||
def handle_get_user_recent_rating_api_request(self, data: Dict) -> Dict:
|
||||
recet_rating_list = self.data.profile.get_profile_recent_rating(data["userId"])
|
||||
if recet_rating_list is None:
|
||||
recent_rating_list = self.data.profile.get_profile_recent_rating(data["userId"])
|
||||
if recent_rating_list is None:
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
"length": 0,
|
||||
@ -466,8 +466,8 @@ class ChuniBase:
|
||||
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
"length": len(recet_rating_list["recentRating"]),
|
||||
"userRecentRatingList": recet_rating_list["recentRating"],
|
||||
"length": len(recent_rating_list["recentRating"]),
|
||||
"userRecentRatingList": recent_rating_list["recentRating"],
|
||||
}
|
||||
|
||||
def handle_get_user_region_api_request(self, data: Dict) -> Dict:
|
||||
@ -479,9 +479,25 @@ class ChuniBase:
|
||||
}
|
||||
|
||||
def handle_get_user_team_api_request(self, data: Dict) -> Dict:
|
||||
# TODO: Team
|
||||
# TODO: use the database "chuni_profile_team" with a GUI
|
||||
team_name = self.game_cfg.team.team_name
|
||||
if team_name == "":
|
||||
return {"userId": data["userId"], "teamId": 0}
|
||||
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
"teamId": 1,
|
||||
"teamRank": 1,
|
||||
"teamName": team_name,
|
||||
"userTeamPoint": {
|
||||
"userId": data["userId"],
|
||||
"teamId": 1,
|
||||
"orderId": 1,
|
||||
"teamPoint": 1,
|
||||
"aggrDate": data["playDate"],
|
||||
},
|
||||
}
|
||||
|
||||
def handle_get_team_course_setting_api_request(self, data: Dict) -> Dict:
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
@ -583,6 +599,9 @@ class ChuniBase:
|
||||
return {"returnCode": "1"}
|
||||
|
||||
def handle_upsert_user_chargelog_api_request(self, data: Dict) -> Dict:
|
||||
# add tickets after they got bought, this makes sure the tickets are
|
||||
# still valid after an unsuccessful logout
|
||||
self.data.profile.put_profile_charge(data["userId"], data["userCharge"])
|
||||
return {"returnCode": "1"}
|
||||
|
||||
def handle_upsert_client_bookkeeping_api_request(self, data: Dict) -> Dict:
|
||||
@ -603,7 +622,5 @@ class ChuniBase:
|
||||
def handle_get_user_net_battle_data_api_request(self, data: Dict) -> Dict:
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
"userNetBattleData": {
|
||||
"recentNBSelectMusicList": []
|
||||
}
|
||||
"userNetBattleData": {"recentNBSelectMusicList": []},
|
||||
}
|
@ -21,6 +21,32 @@ class ChuniServerConfig:
|
||||
)
|
||||
|
||||
|
||||
class ChuniTeamConfig:
|
||||
def __init__(self, parent_config: "ChuniConfig") -> None:
|
||||
self.__config = parent_config
|
||||
|
||||
@property
|
||||
def team_name(self) -> str:
|
||||
return CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "team", "name", default=""
|
||||
)
|
||||
|
||||
|
||||
class ChuniVersionConfig:
|
||||
def __init__(self, parent_config: "ChuniConfig") -> None:
|
||||
self.__config = parent_config
|
||||
|
||||
def version_rom(self, version: int) -> str:
|
||||
return CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "version", f"{version}", "rom", default="2.00.00"
|
||||
)
|
||||
|
||||
def version_data(self, version: int) -> str:
|
||||
return CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "version", f"{version}", "data", default="2.00.00"
|
||||
)
|
||||
|
||||
|
||||
class ChuniCryptoConfig:
|
||||
def __init__(self, parent_config: "ChuniConfig") -> None:
|
||||
self.__config = parent_config
|
||||
@ -46,4 +72,6 @@ class ChuniCryptoConfig:
|
||||
class ChuniConfig(dict):
|
||||
def __init__(self) -> None:
|
||||
self.server = ChuniServerConfig(self)
|
||||
self.team = ChuniTeamConfig(self)
|
||||
self.version = ChuniVersionConfig(self)
|
||||
self.crypto = ChuniCryptoConfig(self)
|
||||
|
@ -49,8 +49,8 @@ class ChuniNew(ChuniBase):
|
||||
"matchEndTime": match_end,
|
||||
"matchTimeLimit": 99,
|
||||
"matchErrorLimit": 9999,
|
||||
"romVersion": "2.00.00",
|
||||
"dataVersion": "2.00.00",
|
||||
"romVersion": self.game_cfg.version.version_rom(self.version),
|
||||
"dataVersion": self.game_cfg.version.version_data(self.version),
|
||||
"matchingUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/",
|
||||
"matchingUriX": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/",
|
||||
"udpHolePunchUri": f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/200/ChuniServlet/",
|
||||
@ -454,9 +454,7 @@ class ChuniNew(ChuniBase):
|
||||
|
||||
# set the card print state to success and use the orderId as the key
|
||||
self.data.item.put_user_print_state(
|
||||
user_id,
|
||||
id=upsert["orderId"],
|
||||
hasCompleted=True
|
||||
user_id, id=upsert["orderId"], hasCompleted=True
|
||||
)
|
||||
|
||||
return {"returnCode": "1", "apiName": "CMUpsertUserPrintSubtractApi"}
|
||||
@ -467,10 +465,6 @@ class ChuniNew(ChuniBase):
|
||||
|
||||
# set the card print state to success and use the orderId as the key
|
||||
for order_id in order_ids:
|
||||
self.data.item.put_user_print_state(
|
||||
user_id,
|
||||
id=order_id,
|
||||
hasCompleted=True
|
||||
)
|
||||
self.data.item.put_user_print_state(user_id, id=order_id, hasCompleted=True)
|
||||
|
||||
return {"returnCode": "1", "apiName": "CMUpsertUserPrintCancelApi"}
|
||||
|
@ -1,6 +1,4 @@
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Dict, Any
|
||||
import pytz
|
||||
|
||||
from core.config import CoreConfig
|
||||
from titles.chuni.new import ChuniNew
|
||||
@ -15,8 +13,12 @@ class ChuniNewPlus(ChuniNew):
|
||||
|
||||
def handle_get_game_setting_api_request(self, data: Dict) -> Dict:
|
||||
ret = super().handle_get_game_setting_api_request(data)
|
||||
ret["gameSetting"]["romVersion"] = "2.05.00"
|
||||
ret["gameSetting"]["dataVersion"] = "2.05.00"
|
||||
ret["gameSetting"]["romVersion"] = self.game_cfg.version.version_rom(
|
||||
self.version
|
||||
)
|
||||
ret["gameSetting"]["dataVersion"] = self.game_cfg.version.version_data(
|
||||
self.version
|
||||
)
|
||||
ret["gameSetting"][
|
||||
"matchingUri"
|
||||
] = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}/SDHD/205/ChuniServlet/"
|
||||
|
@ -558,8 +558,10 @@ class ChuniProfileData(BaseData):
|
||||
return result.lastrowid
|
||||
|
||||
def get_profile_activity(self, aime_id: int, kind: int) -> Optional[List[Row]]:
|
||||
sql = select(activity).where(
|
||||
and_(activity.c.user == aime_id, activity.c.kind == kind)
|
||||
sql = (
|
||||
select(activity)
|
||||
.where(and_(activity.c.user == aime_id, activity.c.kind == kind))
|
||||
.order_by(activity.c.sortNumber.desc()) # to get the last played track
|
||||
)
|
||||
|
||||
result = self.execute(sql)
|
||||
|
@ -390,20 +390,17 @@ class ChuniStaticData(BaseData):
|
||||
return None
|
||||
return result.fetchall()
|
||||
|
||||
def get_gacha_card_by_character(self, gacha_id: int, chara_id: int) -> Optional[Dict]:
|
||||
def get_gacha_card_by_character(
|
||||
self, gacha_id: int, chara_id: int
|
||||
) -> Optional[Dict]:
|
||||
sql_sub = (
|
||||
select(cards.c.cardId)
|
||||
.filter(
|
||||
cards.c.charaId == chara_id
|
||||
)
|
||||
.scalar_subquery()
|
||||
select(cards.c.cardId).filter(cards.c.charaId == chara_id).scalar_subquery()
|
||||
)
|
||||
|
||||
# Perform the main query, also rename the resulting column to ranking
|
||||
sql = gacha_cards.select(and_(
|
||||
gacha_cards.c.gachaId == gacha_id,
|
||||
gacha_cards.c.cardId == sql_sub
|
||||
))
|
||||
sql = gacha_cards.select(
|
||||
and_(gacha_cards.c.gachaId == gacha_id, gacha_cards.c.cardId == sql_sub)
|
||||
)
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
|
@ -635,14 +635,14 @@ class WaccaBase:
|
||||
new_tickets.append([ticket["id"], ticket["ticket_id"], 9999999999])
|
||||
|
||||
for item in req.itemsUsed:
|
||||
if item.itemType == WaccaConstants.ITEM_TYPES["wp"]:
|
||||
if item.itemType == WaccaConstants.ITEM_TYPES["wp"] and not self.game_config.mods.infinite_wp:
|
||||
if current_wp >= item.quantity:
|
||||
current_wp -= item.quantity
|
||||
self.data.profile.spend_wp(req.profileId, item.quantity)
|
||||
else:
|
||||
return BaseResponse().make()
|
||||
|
||||
elif item.itemType == WaccaConstants.ITEM_TYPES["ticket"]:
|
||||
elif item.itemType == WaccaConstants.ITEM_TYPES["ticket"] and not self.game_config.mods.infinite_tickets:
|
||||
for x in range(len(new_tickets)):
|
||||
if new_tickets[x][1] == item.itemId:
|
||||
self.data.item.spend_ticket(new_tickets[x][0])
|
||||
@ -836,7 +836,7 @@ class WaccaBase:
|
||||
resp.songDetail.grades = SongDetailGradeCountsV2(counts=grades)
|
||||
else:
|
||||
resp.songDetail.grades = SongDetailGradeCountsV1(counts=grades)
|
||||
|
||||
resp.songDetail.lock_state = 1
|
||||
return resp.make()
|
||||
|
||||
# TODO: Coop and vs data
|
||||
@ -880,7 +880,7 @@ class WaccaBase:
|
||||
user_id = profile["user"]
|
||||
resp.currentWp = profile["wp"]
|
||||
|
||||
if req.purchaseType == PurchaseType.PurchaseTypeWP:
|
||||
if req.purchaseType == PurchaseType.PurchaseTypeWP and not self.game_config.mods.infinite_wp:
|
||||
resp.currentWp -= req.cost
|
||||
self.data.profile.spend_wp(req.profileId, req.cost)
|
||||
|
||||
@ -1074,14 +1074,7 @@ class WaccaBase:
|
||||
)
|
||||
if not old_score:
|
||||
self.data.score.put_best_score(
|
||||
user_id,
|
||||
item.itemId,
|
||||
item.quantity,
|
||||
0,
|
||||
[0] * 5,
|
||||
[0] * 13,
|
||||
0,
|
||||
0,
|
||||
user_id, item.itemId, item.quantity, 0, [0] * 5, [0] * 13, 0, 0
|
||||
)
|
||||
|
||||
if item.quantity == 0:
|
||||
|
@ -577,7 +577,21 @@ class SongDetailGradeCountsV2(SongDetailGradeCountsV1):
|
||||
self.ssspCt = counts[12]
|
||||
|
||||
def make(self) -> List:
|
||||
return super().make() + [self.spCt, self.sspCt, self.ssspCt]
|
||||
return [
|
||||
self.dCt,
|
||||
self.cCt,
|
||||
self.bCt,
|
||||
self.aCt,
|
||||
self.aaCt,
|
||||
self.aaaCt,
|
||||
self.sCt,
|
||||
self.spCt,
|
||||
self.ssCt,
|
||||
self.sspCt,
|
||||
self.sssCt,
|
||||
self.ssspCt,
|
||||
self.masterCt,
|
||||
]
|
||||
|
||||
|
||||
class BestScoreDetailV1:
|
||||
@ -928,7 +942,7 @@ class MusicUpdateDetailV1:
|
||||
self.score = 0
|
||||
self.lowestMissCount = 0
|
||||
self.maxSkillPts = 0
|
||||
self.locked = 0
|
||||
self.lock_state = 0
|
||||
|
||||
def make(self) -> List:
|
||||
return [
|
||||
@ -940,7 +954,7 @@ class MusicUpdateDetailV1:
|
||||
self.score,
|
||||
self.lowestMissCount,
|
||||
self.maxSkillPts,
|
||||
self.locked,
|
||||
self.lock_state,
|
||||
]
|
||||
|
||||
|
||||
|
@ -12,8 +12,8 @@ class UserInfoUpdateRequest(BaseRequest):
|
||||
self.optsUpdated: List[UserOption] = []
|
||||
self.unknown2: List = self.params[2]
|
||||
self.datesUpdated: List[DateUpdate] = []
|
||||
self.favoritesAdded: List[int] = self.params[4]
|
||||
self.favoritesRemoved: List[int] = self.params[5]
|
||||
self.favoritesRemoved: List[int] = self.params[4]
|
||||
self.favoritesAdded: List[int] = self.params[5]
|
||||
|
||||
for x in self.params[1]:
|
||||
self.optsUpdated.append(UserOption(x[0], x[1]))
|
||||
|
@ -102,7 +102,7 @@ class WaccaServlet:
|
||||
resp.message = "不正なリクエスト エラーです"
|
||||
return end(resp.make())
|
||||
|
||||
if "/api/" in url_path:
|
||||
if "api/" in url_path:
|
||||
func_to_find = (
|
||||
"handle_" + url_path.partition("api/")[2].replace("/", "_") + "_request"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user