mirror of
https://github.com/Remik1r3n/maimaiDX-Api.git
synced 2025-05-20 01:07:28 +08:00
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
# 解锁一些东西的外部代码
|
|
|
|
from loguru import logger
|
|
|
|
from Config import *
|
|
from HelperLogInOut import apiLogin, apiLogout, generateTimestamp
|
|
from HelperUnlockThing import implUnlockThing
|
|
|
|
def implUnlockSingleItem(itemId: int, itemKind: int, userId: int, currentLoginTimestamp:int, currentLoginResult) -> str:
|
|
"""
|
|
发单个东西,比如搭档 10
|
|
"""
|
|
userItemList = [
|
|
{
|
|
"itemKind": itemKind,
|
|
"itemId": itemId,
|
|
"stock": 1,
|
|
"isValid": True
|
|
}
|
|
]
|
|
unlockThingResult = implUnlockThing(userItemList, userId, currentLoginTimestamp, currentLoginResult)
|
|
return unlockThingResult
|
|
|
|
def implUnlockMusic(musicToBeUnlocked: int, userId: int, currentLoginTimestamp:int, currentLoginResult) -> str:
|
|
"""
|
|
解锁乐曲
|
|
"""
|
|
userItemList = [
|
|
{
|
|
"itemKind": 5,
|
|
"itemId": musicToBeUnlocked,
|
|
"stock": 1,
|
|
"isValid": True
|
|
},
|
|
{
|
|
"itemKind": 6,
|
|
"itemId": musicToBeUnlocked,
|
|
"stock": 1,
|
|
"isValid": True
|
|
},
|
|
]
|
|
unlockThingResult = implUnlockThing(userItemList, userId, currentLoginTimestamp, currentLoginResult)
|
|
return unlockThingResult
|