feat: unlock multiple partners

This commit is contained in:
mokurin000
2025-08-11 22:12:54 +08:00
parent 65eced4fca
commit 28926bc14d
2 changed files with 19 additions and 8 deletions

View File

@@ -7,18 +7,22 @@ from HelperLogInOut import apiLogin, apiLogout, generateTimestamp
from HelperUnlockThing import implUnlockThing
def implUnlockSingleItem(
itemId: int,
def implUnlockMultiItem(
itemKind: int,
userId: int,
currentLoginTimestamp: int,
currentLoginResult,
*itemIds: int,
) -> str:
if not itemIds:
logger.info("无操作,跳过处理!")
return
"""
发单个东西,比如搭档 10
"""
userItemList = [
{"itemKind": itemKind, "itemId": itemId, "stock": 1, "isValid": True}
for itemId in itemIds
]
unlockThingResult = implUnlockThing(
userItemList, userId, currentLoginTimestamp, currentLoginResult
@@ -51,8 +55,15 @@ if __name__ == "__main__":
logger.info("登录失败")
exit()
try:
items = [23]
logger.info(
implUnlockSingleItem(14, 10, userId, currentLoginTimestamp, loginResult)
implUnlockMultiItem(
10,
userId,
currentLoginTimestamp,
loginResult,
*items,
)
)
logger.info(apiLogout(currentLoginTimestamp, userId))
finally: