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:

View File

@@ -1,8 +1,8 @@
regionId = 22
regionName = "山东"
placeId = 3490
placeName = "赛博时空枣庄市中"
clientId = "A63E01E9564"
regionId = 13
regionName = "河南"
placeId = 2411
placeName = "智游星期六河南郑州"
clientId = "A63E01E6154"
useProxy = False
proxyUrl = "http://100.104.133.113:33080"