Files
maimaiDX-Api/HelperUnlockThing.py
2025-08-10 16:48:38 +08:00

89 lines
2.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 解锁东西的一个通用的助手,不可独立使用
from HelperFullPlay import implFullPlayAction
def implUnlockThing(
newUserItemList, userId: int, currentLoginTimestamp: int, currentLoginResult
) -> str:
musicData = {
"musicId": 11538, # Amber Chronicle
"level": 0,
"playCount": 1,
"achievement": 0,
"comboStatus": 0,
"syncStatus": 0,
"deluxscoreMax": 0,
"scoreRank": 0,
"extNum1": 0,
}
userAllPatches = {
"upsertUserAll": {
"userMusicDetailList": [musicData],
"isNewMusicDetailList": "1",
"userItemList": newUserItemList,
"isNewItemList": "1" * len(newUserItemList),
}
}
result = implFullPlayAction(
userId, currentLoginTimestamp, currentLoginResult, musicData, userAllPatches
)
return result
itemKindDict = {
"PLATE": 1, # 姓名框
"TITLE": 2, # 称号
"ICON": 3, # 头像
"MUSIC": 5, # 歌
"MUSIC_MASTER": 6, # 紫谱
"MUSIC_RE_MASTER": 7, # 白谱
"CHARACTER": 9, # 旅行伙伴
"PARTNER": 10, # 搭档
"FRAME": 11, # 背景板
"TICKET": 12, # 功能票
# "PRESENT": 4, #
# "MUSIC_STRONG": 8, #
}
itemKindzhCNDict = {
"姓名框": "PLATE",
"称号": "TITLE",
"头像": "ICON",
"": "MUSIC",
"紫谱": "MUSIC_MASTER",
"白谱": "MUSIC_RE_MASTER",
"旅行伙伴": "CHARACTER",
"搭档": "PARTNER",
"背景板": "FRAME",
"功能票": "TICKET",
# "礼物": "PRESENT",
# "STRONG": "MUSIC_STRONG",
}
partnerList = {
"1": "迪拉熊",
"17": "青柠熊&柠檬熊",
"29": "青柠熊柠檬熊2024",
"11": "乙姫",
"18": "乙姫Splash",
"28": "乙姫2024",
"12": "拉兹",
"23": "拉兹2023",
"30": "拉兹 (BUDDiES)",
"13": "雪纺",
"24": "雪纺2023",
"14": "莎露朵",
"25": "莎露朵2023",
"31": "莎露朵 (PRiSM)",
"15": "夏玛",
"19": "夏玛UNiVERSE",
"16": "咪璐库",
"21": "小咪璐库",
"32": "咪璐库 (PRiSM)",
"20": "咪璐库UNiVERSE",
"22": "百合咲美香",
"26": "黒姫",
"27": "俊达萌",
"33": "超天酱",
}