Implement Resort Anthem and Lincle

This commit is contained in:
drmext 2022-10-11 01:30:53 +00:00
parent 75dd75bb05
commit 1dbeb4e873
No known key found for this signature in database
GPG Key ID: F1ED48FFE79A6961
7 changed files with 646 additions and 330 deletions

View File

@ -13,8 +13,10 @@ Edit services url and enable url_slash
## Playable Games:
- `DDR A20 PLUS`
- `DDR A3`
- `IIDX 20 tricoro`
- `IIDX 29 CastHour`
- `SDVX 6 Exceed Gear`
- DDR A20 PLUS
- DDR A3
- IIDX 18 Resort Anthem
- IIDX 19 Lincle
- IIDX 20 tricoro
- IIDX 29 CastHour
- SDVX 6 Exceed Gear

View File

@ -52,12 +52,16 @@ async def core_get_game_version_from_software_version(software_version):
if model == 'LDJ' and ext >= 2021101300:
return 29
elif model == 'JDZ' and ext == 2011071200:
return 18
elif model == 'KDZ' and ext == 2012090300:
return 19
elif model == 'LDJ' and ext == 2013090900:
return 20
elif model == 'MDX' and ext >= 2019022600:
return 19
elif model == 'KFC' and ext >= 2020090402:
return 6
elif model == 'LDJ' and ext == 2013090900:
return 20
else:
return 0

View File

@ -12,6 +12,8 @@ def get_target_table(game_id):
"LDJ": "iidx_profile",
"MDX": "ddr_profile",
"KFC": "sdvx_profile",
"JDZ": "iidx_profile",
"KDZ": "iidx_profile",
}
return target_table[game_id]

View File

@ -10,7 +10,7 @@ from core_database import get_db
import config
router = APIRouter(prefix='/local', tags=['local'])
router.model_whitelist = ['LDJ']
router.model_whitelist = ['LDJ', 'KDZ', 'JDZ']
class ClearFlags(IntEnum):
@ -41,6 +41,11 @@ async def music_getrank(request: Request):
):
music_id = record['music_id']
clear_flg = record['clear_flg']
if game_version < 20:
m = str(music_id)
music_id = int(''.join([m[:len(m)-3], m[-2:]]))
if clear_flg == ClearFlags.FULL_COMBO and game_version < 19:
clear_flg = 6
ex_score = record['ex_score']
miss_count = record['miss_count']
cid = record['chart_id']
@ -91,6 +96,10 @@ async def music_crate(request: Request):
crate = {}
fcrate = {}
for stat in all_score_stats:
if game_version < 20:
m = str(stat['music_id'])
stat['music_id'] = int(''.join([m[:len(m)-3], m[-2:]]))
if stat['music_id'] not in crate:
crate[stat['music_id']] = [101] * 6
if stat['music_id'] not in fcrate:
@ -127,12 +136,20 @@ async def music_reg(request: Request):
clid = int(root.attrib['clid'])
great_num = int(root.attrib['gnum'])
iidx_id = int(root.attrib['iidxid'])
is_death = int(root.attrib['is_death'])
music_id = int(root.attrib['mid'])
miss_num = int(root.attrib['mnum'])
pgreat_num = int(root.attrib['pgnum'])
pid = int(root.attrib['pid'])
ex_score = (pgreat_num * 2) + great_num
if game_version == 20:
is_death = int(root.attrib['is_death'])
music_id = int(root.attrib['mid'])
else:
is_death = 1 if clear_flg < ClearFlags.ASSIST_CLEAR else 0
m = str(root.attrib['mid'])
music_id = int('0'.join([m[:len(m)-2], m[-2:]]))
if clear_flg == 6 and game_version < 19:
clear_flg = ClearFlags.FULL_COMBO
if clid < 3:
note_id = clid + 1
play_style = 0
@ -249,11 +266,11 @@ async def music_reg(request: Request):
'opname': config.arcade,
'name': game_profile['djname'],
'pid': game_profile['region'],
'body': game_profile['body'],
'face': game_profile['face'],
'hair': game_profile['hair'],
'hand': game_profile['hand'],
'head': game_profile['head'],
'body': game_profile.get('body', 0),
'face': game_profile.get('face', 0),
'hair': game_profile.get('hair', 0),
'hand': game_profile.get('hand', 0),
'head': game_profile.get('head', 0),
'dgrade': game_profile['grade_double'],
'sgrade': game_profile['grade_single'],
'score': score['ex_score'],

View File

@ -9,7 +9,7 @@ from core_common import core_process_request, core_prepare_response, E
from core_database import get_db
router = APIRouter(prefix="/local", tags=["local"])
router.model_whitelist = ["LDJ"]
router.model_whitelist = ["LDJ", "KDZ", "JDZ"]
def get_profile(cid):
@ -56,208 +56,365 @@ async def pc_get(request: Request):
request_info = await core_process_request(request)
game_version = request_info['game_version']
cid = request_info['root'][0].attrib['did']
cid = request_info['root'][0].attrib['rid']
profile = get_game_profile(cid, game_version)
djid, djid_split = get_id_from_profile(cid)
response = E.response(
E.pc(
E.pcdata(
dach=profile['dach'],
dp_opt=profile['dp_opt'],
dp_opt2=profile['dp_opt2'],
dpnum=profile["dpnum"],
gno=profile['gno'],
gpos=profile['gpos'],
help=profile['help'],
hispeed=profile['hispeed'],
id=djid,
idstr=djid_split,
judge=profile['judge'],
judgeAdj=profile['judgeAdj'],
liflen=profile['lift'],
mode=profile['mode'],
name=profile['djname'],
notes=profile['notes'],
opstyle=profile['opstyle'],
pase=profile['pase'],
pid=profile['region'],
pmode=profile['pmode'],
sach=profile['sach'],
sdhd=profile['sdhd'],
sdtype=profile['sdtype'],
sp_opt=profile['sp_opt'],
spnum=profile["spnum"],
timing=profile['timing'],
),
E.qprodata([profile["head"], profile["hair"], profile["face"], profile["hand"], profile["body"]],
__type="u32", __size=5 * 4),
E.skin(
[
0,
profile["turntable"],
profile["explosion"],
profile["bgm"],
calculate_folder_mask(profile),
profile["sudden"],
0,
profile["categoryvoice"],
profile["note"],
profile["fullcombo"],
profile["keybeam"],
profile["judgestring"],
-1,
profile["soundpreview"],
],
__type="s16"),
E.rlist(),
E.commonboss(baron=0, deller=profile['deller'], orb=0),
E.secret(
E.flg1(profile.get('secret_flg1', [-1]), __type="s64"),
E.flg2(profile.get('secret_flg2', [-1]), __type="s64"),
E.flg3(profile.get('secret_flg3', [-1]), __type="s64"),
),
E.join_shop(join_cflg=1, join_id=10, join_name=config.arcade, joinflg=1),
E.grade(
*[E.g(x, __type="u8") for x in profile['grade_values']],
dgid=profile['grade_double'],
sgid=profile['grade_single'],
),
E.redboss(
crush=profile.get('redboss_crush', 0),
open=profile.get('redboss_open', 0),
progress=profile.get('redboss_progress', 0),
),
E.blueboss(
column0=profile.get('blueboss_column0', 0),
column1=profile.get('blueboss_column1', 0),
first_flg=profile.get('blueboss_first_flg', 0),
gauge=profile.get('blueboss_gauge', 0),
general=profile.get('blueboss_general', 0),
item=profile.get('blueboss_item', 0),
item_flg=profile.get('blueboss_item_flg', 0),
level=profile.get('blueboss_level', 0),
row0=profile.get('blueboss_row0', 0),
row1=profile.get('blueboss_row1', 0),
sector=profile.get('blueboss_sector', 0),
),
E.yellowboss(
E.p_attack(profile.get('yellowboss_p_attack', [0] * 7), __type="s32"),
E.pbest_attack(profile.get('yellowboss_pbest_attack', [0] * 7), __type="s32"),
E.defeat(profile.get('yellowboss_defeat', [0] * 7), __type="bool"),
E.shop_damage(profile.get('yellowboss_shop_damage', [0] * 7), __type="s32"),
critical=profile.get('yellowboss_critical', 0),
destiny=profile.get('yellowboss_destiny', 0),
first_flg=profile.get('yellowboss_first_flg', 1),
heroic0=profile.get('yellowboss_heroic0', 0),
heroic1=profile.get('yellowboss_heroic1', 0),
join_num=profile.get('yellowboss_join_num', 0),
last_select=profile.get('yellowboss_last_select', 0),
level=profile.get('yellowboss_level', 1),
shop_message=profile.get('yellowboss_shop_message', ""),
special_move=profile.get('yellowboss_special_move', ""),
),
E.link5(
anisakis=1,
bad=1,
beachside=1,
beautiful=1,
broken=1,
castle=1,
china=1,
cuvelia=1,
exusia=1,
fallen=1,
flip=1,
glass=1,
glassflg=1,
qpro=1,
qproflg=1,
quaver=1,
reflec_data=1,
reunion=1,
sakura=1,
sampling=1,
second=1,
summer=1,
survival=1,
thunder=1,
titans=1,
treasure=1,
turii=1,
waxing=1,
whydidyou=1,
wuv=1,
),
E.cafe(
astraia=1,
bastie=1,
beachimp=1,
food=0,
holysnow=1,
is_first=0,
ledvsscu=1,
pastry=0,
rainbow=1,
service=0,
trueblue=1,
),
E.tricolettepark(
attack_rate=0,
boss0_damage=0,
boss0_stun=0,
boss1_damage=0,
boss1_stun=0,
boss2_damage=0,
boss2_stun=0,
boss3_damage=0,
boss3_stun=0,
is_union=0,
magic_gauge=0,
open_music=-1,
party=0,
),
E.weekly(
mid=-1,
wid=1,
),
E.packinfo(
music_0=-1,
music_1=-1,
music_2=-1,
pack_id=1,
),
E.visitor(anum=1, pnum=2, snum=1, vs_flg=1),
E.gakuen(music_list=-1),
E.achievements(
E.trophy(
profile.get('achievements_trophy', [])[:10],
__type="s64"
if game_version == 20:
response = E.response(
E.pc(
E.pcdata(
dach=profile['dach'],
dp_opt=profile['dp_opt'],
dp_opt2=profile['dp_opt2'],
dpnum=profile["dpnum"],
gno=profile['gno'],
gpos=profile['gpos'],
help=profile['help'],
hispeed=profile['hispeed'],
id=djid,
idstr=djid_split,
judge=profile['judge'],
judgeAdj=profile['judgeAdj'],
liflen=profile['lift'],
mode=profile['mode'],
name=profile['djname'],
notes=profile['notes'],
opstyle=profile['opstyle'],
pase=profile['pase'],
pid=profile['region'],
pmode=profile['pmode'],
sach=profile['sach'],
sdhd=profile['sdhd'],
sdtype=profile['sdtype'],
sp_opt=profile['sp_opt'],
spnum=profile["spnum"],
timing=profile['timing'],
),
last_weekly=profile.get('achievements_last_weekly', 0),
pack=profile.get('achievements_pack_id', 0),
pack_comp=profile.get('achievements_pack_comp', 0),
rival_crush=0,
visit_flg=profile.get('achievements_visit_flg', 0),
weekly_num=profile.get('achievements_weekly_num', 0),
),
E.step(
E.stamp("", __type="bin"),
E.help("", __type="bin"),
dp_ach=0,
dp_hdpt=0,
dp_level=0,
dp_mplay=0,
dp_round=0,
review=0,
sp_ach=0,
sp_hdpt=0,
sp_level=0,
sp_mplay=0,
sp_round=0,
E.qprodata([profile["head"], profile["hair"], profile["face"], profile["hand"], profile["body"]],
__type="u32", __size=5 * 4),
E.skin(
[
0,
profile["turntable"],
profile["explosion"],
profile["bgm"],
calculate_folder_mask(profile),
profile["sudden"],
0,
profile["categoryvoice"],
profile["note"],
profile["fullcombo"],
profile["keybeam"],
profile["judgestring"],
-1,
profile["soundpreview"],
],
__type="s16"),
E.rlist(),
E.commonboss(baron=0, deller=profile['deller'], orb=0),
E.secret(
E.flg1(profile.get('secret_flg1', [-1]), __type="s64"),
E.flg2(profile.get('secret_flg2', [-1]), __type="s64"),
E.flg3(profile.get('secret_flg3', [-1]), __type="s64"),
),
E.join_shop(join_cflg=1, join_id=10, join_name=config.arcade, joinflg=1),
E.grade(
*[E.g(x, __type="u8") for x in profile['grade_values']],
dgid=profile['grade_double'],
sgid=profile['grade_single'],
),
E.redboss(
crush=profile.get('redboss_crush', 0),
open=profile.get('redboss_open', 0),
progress=profile.get('redboss_progress', 0),
),
E.blueboss(
column0=profile.get('blueboss_column0', 0),
column1=profile.get('blueboss_column1', 0),
first_flg=profile.get('blueboss_first_flg', 0),
gauge=profile.get('blueboss_gauge', 0),
general=profile.get('blueboss_general', 0),
item=profile.get('blueboss_item', 0),
item_flg=profile.get('blueboss_item_flg', 0),
level=profile.get('blueboss_level', 0),
row0=profile.get('blueboss_row0', 0),
row1=profile.get('blueboss_row1', 0),
sector=profile.get('blueboss_sector', 0),
),
E.yellowboss(
E.p_attack(profile.get('yellowboss_p_attack', [0] * 7), __type="s32"),
E.pbest_attack(profile.get('yellowboss_pbest_attack', [0] * 7), __type="s32"),
E.defeat(profile.get('yellowboss_defeat', [0] * 7), __type="bool"),
E.shop_damage(profile.get('yellowboss_shop_damage', [0] * 7), __type="s32"),
critical=profile.get('yellowboss_critical', 0),
destiny=profile.get('yellowboss_destiny', 0),
first_flg=profile.get('yellowboss_first_flg', 1),
heroic0=profile.get('yellowboss_heroic0', 0),
heroic1=profile.get('yellowboss_heroic1', 0),
join_num=profile.get('yellowboss_join_num', 0),
last_select=profile.get('yellowboss_last_select', 0),
level=profile.get('yellowboss_level', 1),
shop_message=profile.get('yellowboss_shop_message', ""),
special_move=profile.get('yellowboss_special_move', ""),
),
E.link5(
anisakis=1,
bad=1,
beachside=1,
beautiful=1,
broken=1,
castle=1,
china=1,
cuvelia=1,
exusia=1,
fallen=1,
flip=1,
glass=1,
glassflg=1,
qpro=1,
qproflg=1,
quaver=1,
reflec_data=1,
reunion=1,
sakura=1,
sampling=1,
second=1,
summer=1,
survival=1,
thunder=1,
titans=1,
treasure=1,
turii=1,
waxing=1,
whydidyou=1,
wuv=1,
),
E.cafe(
astraia=1,
bastie=1,
beachimp=1,
food=0,
holysnow=1,
is_first=0,
ledvsscu=1,
pastry=0,
rainbow=1,
service=0,
trueblue=1,
),
E.tricolettepark(
attack_rate=0,
boss0_damage=0,
boss0_stun=0,
boss1_damage=0,
boss1_stun=0,
boss2_damage=0,
boss2_stun=0,
boss3_damage=0,
boss3_stun=0,
is_union=0,
magic_gauge=0,
open_music=-1,
party=0,
),
E.weekly(
mid=-1,
wid=1,
),
E.packinfo(
music_0=-1,
music_1=-1,
music_2=-1,
pack_id=1,
),
E.visitor(anum=1, pnum=2, snum=1, vs_flg=1),
E.gakuen(music_list=-1),
E.achievements(
E.trophy(
profile.get('achievements_trophy', [])[:10],
__type="s64"
),
last_weekly=profile.get('achievements_last_weekly', 0),
pack=profile.get('achievements_pack_id', 0),
pack_comp=profile.get('achievements_pack_comp', 0),
rival_crush=0,
visit_flg=profile.get('achievements_visit_flg', 0),
weekly_num=profile.get('achievements_weekly_num', 0),
),
E.step(
E.stamp(profile.get('stepup_stamp', ""), __type="bin"),
E.help(profile.get('stepup_help', ""), __type="bin"),
dp_ach=profile.get('stepup_dp_ach', 0),
dp_hdpt=profile.get('stepup_dp_hdpt', 0),
dp_level=profile.get('stepup_dp_level', 0),
dp_mplay=profile.get('stepup_dp_mplay', 0),
dp_round=profile.get('stepup_dp_round', 0),
review=profile.get('stepup_review', 0),
sp_ach=profile.get('stepup_sp_ach', 0),
sp_hdpt=profile.get('stepup_sp_hdpt', 0),
sp_level=profile.get('stepup_sp_level', 0),
sp_mplay=profile.get('stepup_sp_mplay', 0),
sp_round=profile.get('stepup_sp_round', 0),
)
)
)
elif game_version == 19:
response = E.response(
E.pc(
E.pcdata(
dach=profile['dach'],
dp_opt=profile['dp_opt'],
dp_opt2=profile['dp_opt2'],
dpnum=profile["dpnum"],
gno=profile['gno'],
help=profile['help'],
id=djid,
idstr=djid_split,
liflen=profile['lift'],
mode=profile['mode'],
name=profile['djname'],
notes=profile['notes'],
pase=profile['pase'],
pid=profile['region'],
pmode=profile['pmode'],
sach=profile['sach'],
sdhd=profile['sdhd'],
sdtype=profile['sdtype'],
sflg0=-1,
sflg1=-1,
sp_opt=profile['sp_opt'],
spnum=profile["spnum"],
timing=profile['timing'],
),
E.qprodata([profile["head"], profile["hair"], profile["face"], profile["hand"], profile["body"]],
__type="u32", __size=5 * 4),
E.skin(
[
profile["frame"],
profile["turntable"],
profile["explosion"],
profile["bgm"],
calculate_folder_mask(profile),
profile["sudden"],
0,
profile["categoryvoice"],
profile["note"],
profile["fullcombo"],
profile["keybeam"],
profile["judgestring"],
0,
0,
],
__type="s16"),
E.grade(
dgid=profile['grade_double'],
sgid=profile['grade_single'],
),
E.ex(),
E.ocrs(),
E.step(
E.sp_cflg("", __type="bin"),
E.dp_cflg("", __type="bin"),
dp_ach=0,
dp_dif=0,
sp_ach=0,
sp_dif=0,
),
E.lincle(comflg=1),
E.reflec(br=1, sg=1, sr=1, ssc=1, tb=1, tf=1, wu=1),
E.phase2(wonder=1, yellow=1),
E.event(knee=1, lethe=0, resist=0, jknee=1, jlethe=0, jresist=0),
E.phase4(
qpro=1,
glass=1,
treasure=1,
beautiful=1,
quaver=1,
castle=1,
flip=1,
titans=1,
exusia=1,
waxing=1,
sampling=1,
beachside=1,
cuvelia=1,
qproflg=1,
glassflg=1,
reunion=1,
bad=1,
turii=1,
anisakis=1,
second=1,
whydidyou=1,
china=1,
fallen=1,
broken=1,
summer=1,
sakura=1,
wuv=1,
survival=1,
thunder=1,
),
E.shop(
E.item([3, 3, 3], __type="u8"),
spitem=1,
),
E.rlist(),
)
)
elif game_version == 18:
response = E.response(
E.pc(
E.pcdata(
dach=profile['dach'],
dp_opt=profile['dp_opt'],
dp_opt2=profile['dp_opt2'],
dpnum=profile["dpnum"],
gno=profile['gno'],
id=djid,
idstr=djid_split,
liflen=profile['lift'],
mcomb=0,
mode=profile['mode'],
name=profile['djname'],
ncomb=0,
pid=profile['region'],
pmode=profile['pmode'],
sach=profile['sach'],
sdhd=profile['sdhd'],
sdtype=profile['sdtype'],
sflg0=-1,
sflg1=-1,
sp_opt=profile['sp_opt'],
spnum=profile["spnum"],
timing=profile['timing'],
),
E.skin(
[
profile["frame"],
profile["turntable"],
profile["explosion"],
profile["bgm"],
calculate_folder_mask(profile),
profile["sudden"],
0,
0,
0,
0,
0,
0,
],
__type="u16"),
E.grade(
dgid="-1",
sgid="-1",
),
E.ex(),
E.ocrs(),
E.rlist(),
)
)
)
response_body, response_headers = await core_prepare_response(request, response)
return Response(content=response_body, headers=response_headers)
@ -266,46 +423,80 @@ async def pc_get(request: Request):
@router.post('/{gameinfo}/pc/common')
async def pc_common(request: Request):
request_info = await core_process_request(request)
game_version = request_info['game_version']
response = E.response(
E.pc(
E.mranking(
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
__type="u16"),
E.ir(beat=2),
E.boss(phase=0),
E.red(phase=2),
E.yellow(phase=4),
E.limit(phase=25),
E.cafe(open=1),
E.yellow_correct(
*[E.detail(
if game_version == 20:
response = E.response(
E.pc(
E.mranking(
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
__type="u16"),
E.ir(beat=2),
E.boss(phase=0),
E.red(phase=2),
E.yellow(phase=4),
E.limit(phase=25),
E.cafe(open=1),
E.yellow_correct(
*[E.detail(
avg_shop=7,
critical=2,
max_condition=18,
max_member=20,
max_resist=1,
min_condition=10,
min_member=1,
min_resist=1,
rival=2
)for detail in range(6)],
E.detail(
avg_shop=7,
critical=2,
max_condition=144,
max_member=20,
max_resist=1,
min_condition=80,
min_member=1,
min_resist=1,
rival=2
),
avg_shop=7,
critical=2,
max_condition=18,
max_member=20,
max_resist=1,
min_condition=10,
min_member=1,
min_resist=1,
rival=2
)for detail in range(6)],
E.detail(
avg_shop=7,
critical=2,
max_condition=144,
max_member=20,
max_resist=1,
min_condition=80,
min_member=1,
min_resist=1,
rival=2
),
avg_shop=7,
),
expire=600
expire=600
)
)
elif game_version == 19:
response = E.response(
E.pc(
E.secret(
E.mid([1901, 1914, 1946, 1955, 1956, 1966], __type="u16"),
E.open([1, 1, 1, 1, 1, 1], __type="bool"),
),
E.boss(phase=2),
E.ir(beat=2),
E.travel(flg=1),
E.lincle(phase=4),
E.monex(no=3),
expire=600
)
)
elif game_version == 18:
response = E.response(
E.pc(
E.cmd(
gmbl=1,
gmbla=1,
regl=1,
rndp=1,
hrnd=1,
alls=1,
),
E.lg(lea=1),
E.ir(beat=3),
E.ev(pha=2),
expire=600
)
)
)
response_body, response_headers = await core_prepare_response(request, response)
return Response(content=response_body, headers=response_headers)
@ -471,89 +662,189 @@ async def pc_reg(request: Request):
iidx_id = random.randint(10000000, 99999999)
all_profiles_for_card['iidx_id'] = iidx_id
all_profiles_for_card['version'][str(game_version)] = {
'game_version': game_version,
'djname': name,
'region': int(pid),
'head': 0,
'hair': 0,
'face': 0,
'hand': 0,
'body': 0,
'turntable': 0,
'explosion': 0,
'bgm': 0,
'folder_mask': 0,
'sudden': 0,
'categoryvoice': 0,
'note': 0,
'fullcombo': 0,
'keybeam': 0,
'judgestring': 0,
'soundpreview': 0,
'dach': 0,
'dp_opt': 0,
'dp_opt2': 0,
'dpnum': 0,
'gno': 0,
'gpos': 0,
'help': 0,
'hispeed': 0,
'judge': 0,
'judgeAdj': 0,
'lift': 0,
'mode': 0,
'notes': 0,
'opstyle': 0,
'pase': 0,
'pmode': 0,
'sach': 0,
'sdhd': 50,
'sdtype': 0,
'sp_opt': 0,
'spnum': 0,
'timing': 0,
'deller': 0,
if game_version == 20:
all_profiles_for_card['version'][str(game_version)] = {
'game_version': game_version,
'djname': name,
'region': int(pid),
'head': 0,
'hair': 0,
'face': 0,
'hand': 0,
'body': 0,
'turntable': 0,
'explosion': 0,
'bgm': 0,
'folder_mask': 0,
'sudden': 0,
'categoryvoice': 0,
'note': 0,
'fullcombo': 0,
'keybeam': 0,
'judgestring': 0,
'soundpreview': 0,
'dach': 0,
'dp_opt': 0,
'dp_opt2': 0,
'dpnum': 0,
'gno': 0,
'gpos': 0,
'help': 0,
'hispeed': 0,
'judge': 0,
'judgeAdj': 0,
'lift': 0,
'mode': 0,
'notes': 0,
'opstyle': 0,
'pase': 0,
'pmode': 0,
'sach': 0,
'sdhd': 50,
'sdtype': 0,
'sp_opt': 0,
'spnum': 0,
'timing': 0,
'deller': 0,
# Step up mode
'stepup_dp_level': 0,
'stepup_dp_mplay': 0,
'stepup_enemy_damage': 0,
'stepup_enemy_defeat_flg': 0,
'stepup_mission_clear_num': 0,
'stepup_progress': 0,
'stepup_sp_level': 0,
'stepup_sp_mplay': 0,
'stepup_tips_read_list': 0,
'stepup_total_point': 0,
'stepup_is_track_ticket': 0,
# Step up mode
'stepup_stamp': "",
'stepup_help': "",
'stepup_dp_ach': 0,
'stepup_dp_hdpt': 0,
'stepup_dp_level': 0,
'stepup_dp_mplay': 0,
'stepup_dp_round': 0,
'stepup_review': 0,
'stepup_sp_ach': 0,
'stepup_sp_hdpt': 0,
'stepup_sp_level': 0,
'stepup_sp_mplay': 0,
'stepup_sp_round': 0,
# Grades
'grade_single': -1,
'grade_double': -1,
'grade_values': [],
# Grades
'grade_single': -1,
'grade_double': -1,
'grade_values': [],
# Achievements
'achievements_trophy': [0] * 80,
'achievements_last_weekly': 0,
'achievements_pack_comp': 0,
'achievements_pack_flg': 0,
'achievements_pack_id': 0,
'achievements_play_pack': 0,
'achievements_visit_flg': 0,
'achievements_weekly_num': 0,
# Achievements
'achievements_trophy': [0] * 80,
'achievements_last_weekly': 0,
'achievements_pack_comp': 0,
'achievements_pack_flg': 0,
'achievements_pack_id': 0,
'achievements_play_pack': 0,
'achievements_visit_flg': 0,
'achievements_weekly_num': 0,
# Web UI/Other options
'_show_category_grade': 0,
'_show_category_status': 1,
'_show_category_difficulty': 1,
'_show_category_alphabet': 1,
'_show_category_rival_play': 0,
'_show_category_rival_winlose': 0,
'_show_rival_shop_info': 0,
'_hide_play_count': 0,
'_hide_rival_info': 1,
}
# Web UI/Other options
'_show_category_grade': 0,
'_show_category_status': 1,
'_show_category_difficulty': 1,
'_show_category_alphabet': 1,
'_show_category_rival_play': 0,
'_show_category_rival_winlose': 0,
'_show_rival_shop_info': 0,
'_hide_play_count': 0,
'_hide_rival_info': 1,
}
elif game_version == 19:
all_profiles_for_card['version'][str(game_version)] = {
'game_version': game_version,
'djname': name,
'region': int(pid),
'head': 0,
'hair': 0,
'face': 0,
'hand': 0,
'body': 0,
'frame': 0,
'turntable': 0,
'explosion': 0,
'bgm': 0,
'folder_mask': 0,
'sudden': 0,
'categoryvoice': 0,
'note': 0,
'fullcombo': 0,
'keybeam': 0,
'judgestring': 0,
'dach': 0,
'dp_opt': 0,
'dp_opt2': 0,
'dpnum': 0,
'gno': 0,
'help': 0,
'lift': 0,
'mode': 0,
'notes': 0,
'pase': 0,
'pmode': 0,
'sach': 0,
'sdhd': 50,
'sdtype': 0,
'sp_opt': 0,
'spnum': 0,
'timing': 0,
# Grades
'grade_single': -1,
'grade_double': -1,
'grade_values': [],
# Web UI/Other options
'_show_category_grade': 0,
'_show_category_status': 1,
'_show_category_difficulty': 1,
'_show_category_alphabet': 1,
'_show_category_rival_play': 0,
'_show_category_rival_winlose': 0,
'_show_rival_shop_info': 0,
'_hide_play_count': 0,
'_hide_rival_info': 1,
}
elif game_version == 18:
all_profiles_for_card['version'][str(game_version)] = {
'game_version': game_version,
'djname': name,
'region': int(pid),
'frame': 0,
'turntable': 0,
'explosion': 0,
'bgm': 0,
'folder_mask': 0,
'sudden': 0,
'dach': 0,
'dp_opt': 0,
'dp_opt2': 0,
'dpnum': 0,
'gno': 0,
'lift': 0,
'mode': 0,
'pmode': 0,
'sach': 0,
'sdhd': 50,
'sdtype': 0,
'sp_opt': 0,
'spnum': 0,
'timing': 0,
# Grades
'grade_single': -1,
'grade_double': -1,
'grade_values': [],
# Web UI/Other options
'_show_category_grade': 0,
'_show_category_status': 1,
'_show_category_difficulty': 1,
'_show_category_alphabet': 1,
'_show_category_rival_play': 0,
'_show_category_rival_winlose': 0,
'_show_rival_shop_info': 0,
'_hide_play_count': 0,
'_hide_rival_info': 1,
}
db.upsert(all_profiles_for_card, where('card') == cid)
card, card_split = get_id_from_profile(cid)

View File

@ -4,8 +4,8 @@ from fastapi import APIRouter, Request, Response
from core_common import core_process_request, core_prepare_response, E
router = APIRouter(prefix="/local2", tags=["local2"])
router.model_whitelist = ["LDJ"]
router = APIRouter(prefix="/local", tags=["local"])
router.model_whitelist = ["LDJ", "KDZ", "JDZ"]
@router.post('/{gameinfo}/ranking/getranker')

View File

@ -5,7 +5,7 @@ from fastapi import APIRouter, Request, Response
from core_common import core_process_request, core_prepare_response, E
router = APIRouter(prefix="/local", tags=["local"])
router.model_whitelist = ["LDJ"]
router.model_whitelist = ["LDJ", "KDZ", "JDZ"]
@router.post('/{gameinfo}/shop/getname')