feat: unlock multiple partners
This commit is contained in:
@@ -7,18 +7,22 @@ from HelperLogInOut import apiLogin, apiLogout, generateTimestamp
|
|||||||
from HelperUnlockThing import implUnlockThing
|
from HelperUnlockThing import implUnlockThing
|
||||||
|
|
||||||
|
|
||||||
def implUnlockSingleItem(
|
def implUnlockMultiItem(
|
||||||
itemId: int,
|
|
||||||
itemKind: int,
|
itemKind: int,
|
||||||
userId: int,
|
userId: int,
|
||||||
currentLoginTimestamp: int,
|
currentLoginTimestamp: int,
|
||||||
currentLoginResult,
|
currentLoginResult,
|
||||||
|
*itemIds: int,
|
||||||
) -> str:
|
) -> str:
|
||||||
|
if not itemIds:
|
||||||
|
logger.info("无操作,跳过处理!")
|
||||||
|
return
|
||||||
"""
|
"""
|
||||||
发单个东西,比如搭档 10
|
发单个东西,比如搭档 10
|
||||||
"""
|
"""
|
||||||
userItemList = [
|
userItemList = [
|
||||||
{"itemKind": itemKind, "itemId": itemId, "stock": 1, "isValid": True}
|
{"itemKind": itemKind, "itemId": itemId, "stock": 1, "isValid": True}
|
||||||
|
for itemId in itemIds
|
||||||
]
|
]
|
||||||
unlockThingResult = implUnlockThing(
|
unlockThingResult = implUnlockThing(
|
||||||
userItemList, userId, currentLoginTimestamp, currentLoginResult
|
userItemList, userId, currentLoginTimestamp, currentLoginResult
|
||||||
@@ -51,8 +55,15 @@ if __name__ == "__main__":
|
|||||||
logger.info("登录失败")
|
logger.info("登录失败")
|
||||||
exit()
|
exit()
|
||||||
try:
|
try:
|
||||||
|
items = [23]
|
||||||
logger.info(
|
logger.info(
|
||||||
implUnlockSingleItem(14, 10, userId, currentLoginTimestamp, loginResult)
|
implUnlockMultiItem(
|
||||||
|
10,
|
||||||
|
userId,
|
||||||
|
currentLoginTimestamp,
|
||||||
|
loginResult,
|
||||||
|
*items,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
logger.info(apiLogout(currentLoginTimestamp, userId))
|
logger.info(apiLogout(currentLoginTimestamp, userId))
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
10
Config.py
10
Config.py
@@ -1,8 +1,8 @@
|
|||||||
regionId = 22
|
regionId = 13
|
||||||
regionName = "山东"
|
regionName = "河南"
|
||||||
placeId = 3490
|
placeId = 2411
|
||||||
placeName = "赛博时空枣庄市中店"
|
placeName = "智游星期六河南郑州店"
|
||||||
clientId = "A63E01E9564"
|
clientId = "A63E01E6154"
|
||||||
|
|
||||||
useProxy = False
|
useProxy = False
|
||||||
proxyUrl = "http://100.104.133.113:33080"
|
proxyUrl = "http://100.104.133.113:33080"
|
||||||
|
|||||||
Reference in New Issue
Block a user