From bf8a5befa38fc78797a34ad5f88680191ed83a13 Mon Sep 17 00:00:00 2001 From: DLmaster Date: Thu, 7 Nov 2024 21:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A0=E9=99=90=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E5=A4=A9=E6=95=B0=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AUTO_MAA.py | 20 ++++++++++++++++---- README.md | 2 +- res/version.json | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/AUTO_MAA.py b/AUTO_MAA.py index 97dcdd0..c4c280e 100644 --- a/AUTO_MAA.py +++ b/AUTO_MAA.py @@ -112,7 +112,7 @@ class MaaRunner(QtCore.QThread): all_index = [ _ for _ in range(len(self.data)) - if (self.data[_][3] > 0 and self.data[_][4] == "y") + if (self.data[_][3] != 0 and self.data[_][4] == "y") ] # 日常代理模式 if self.mode == "日常代理": @@ -253,7 +253,7 @@ class MaaRunner(QtCore.QThread): time.sleep(10) break if run_book[0] and run_book[1]: - if self.data[index][14] == 0: + if self.data[index][14] == 0 and self.data[index][3] != -1: self.data[index][3] -= 1 self.data[index][14] += 1 over_index.append(index) @@ -1599,6 +1599,8 @@ class Main(QWidget): self.user_column[j], ) ) + elif j == 3 and value == -1: + item = QTableWidgetItem("无限") elif j == 5: curdate = server_date() if curdate != value: @@ -1654,6 +1656,8 @@ class Main(QWidget): self.user_column[j], ) ) + elif j == 3 and value == -1: + item = QTableWidgetItem("无限") elif j == 5: curdate = server_date() if curdate != value: @@ -2009,7 +2013,11 @@ class Main(QWidget): text = item.text() if mode == "simple": if item.column() == 3: - text = int(text) + try: + text = max(int(text), -1) + except ValueError: + self.update_user_info("normal") + return None if item.column() in [6, 7, 8]: # 导入与应用特殊关卡规则 games = {} @@ -2029,7 +2037,11 @@ class Main(QWidget): ) elif mode == "beta": if item.column() == 1: - text = int(text) + try: + text = max(int(text), -1) + except ValueError: + self.update_user_info("normal") + return None if item.column() == 6: text = self.encryptx(text) if text != "": diff --git a/README.md b/README.md index 471fd28..5a8f19c 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ MAA多账号管理与自动化软件 - `用户名`:展示在执行界面的用户名,用于区分不同用户。 - `账号ID`:MAA进行账号切换所需的凭据,官服用户请输入手机号码、B服请输入B站ID。 - `服务器`:当前支持官服、B服。 - - `代理天数`:剩余需要进行代理的天数,当剩余天数为0时不再代理或排查。 + - `代理天数`:剩余需要进行代理的天数,输入`任意负数`可设置为无限代理天数,当剩余天数为0时不再代理或排查。 - `状态`:用户的状态,禁用时将不再对其进行代理或排查。 - `执行情况`:当日执行情况,不可编辑。 - `关卡`、`备选关卡-1`、`备选关卡-2`:关卡号。 diff --git a/res/version.json b/res/version.json index 2d12428..0cfc153 100644 --- a/res/version.json +++ b/res/version.json @@ -3,5 +3,5 @@ "main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1_beta/AUTO_MAA_v4.1.1_beta.zip", "updater_version": "1.0.0.0", "updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1_beta/Updater_v1.0.0.zip", - "announcement": "\n# 开发中的版本!非开发者勿直接更新!!否则后果自负!!!\n## 新增功能\n- 添加`启动AUTO_MAA后直接代理`功能" + "announcement": "\n# 开发中的版本!非开发者无必要勿更新!!否则后果自负!!!\n## 新增功能\n- 添加`启动AUTO_MAA后直接代理`功能\n- 添加无限代理天数模式" } \ No newline at end of file