diff --git a/ActionUnlockItem.py b/ActionUnlockItem.py index 48dc8c9..4cb6403 100644 --- a/ActionUnlockItem.py +++ b/ActionUnlockItem.py @@ -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: diff --git a/Config.py b/Config.py index f929772..bc465ed 100644 --- a/Config.py +++ b/Config.py @@ -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"