maimaiDX-Api/HelperUnlockThing.py
2025-02-04 15:39:36 +08:00

79 lines
2.1 KiB
Python
Raw Permalink 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 loguru import logger
from Config import *
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, # 头像
# "PRESENT": 4, #
"MUSIC": 5, # 歌
"MUSIC_MASTER": 6, # 紫谱
"MUSIC_RE_MASTER": 7,# 白谱
# "MUSIC_STRONG": 8, #
"CHARACTER": 9, # 旅行伙伴
"PARTNER": 10, # 搭档
"FRAME": 11, # 背景板
"TICKET": 12 # 功能票
}
itemKindzhCNDict = {
"姓名框": "PLATE",
"称号": "TITLE",
"头像": "ICON",
# "礼物": "PRESENT",
"": "MUSIC",
"紫谱": "MUSIC_MASTER",
"白谱": "MUSIC_RE_MASTER",
# "STRONG": "MUSIC_STRONG",
"旅行伙伴": "CHARACTER",
"搭档": "PARTNER",
"背景板": "FRAME",
"功能票": "TICKET"
}
partnerList = {
"1": "迪拉熊",
"17": "青柠熊&柠檬熊",
"11": "乙姫",
"12": "拉兹",
"13": "雪纺",
"14": "莎露朵",
"15": "夏玛",
"16": "咪璐库",
"18": "乙姫Splash",
"19": "夏玛UNiVERSE",
"20": "咪璐库UNiVERSE",
"21": "小咪璐库",
"22": "百合咲美香",
"23": "拉兹2023",
"24": "雪纺2023",
"25": "莎露朵2023",
"26": "黒姫",
"27": "俊达萌",
"28": "乙姫2024",
"29": "青柠熊柠檬熊2024"
}