From 93258cb982022b4d5443d9cf9dd3ea5cbcd991ff Mon Sep 17 00:00:00 2001 From: Night-stars-1 Date: Thu, 12 Oct 2023 17:47:54 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20equip=5Fpos=E4=BD=BF=E7=94=A8enumerate?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 1 + utils/relic.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 35a3d454..8d0d8996 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,5 +28,6 @@ flet cryptography pluggy httpcore +pydantic pprint jsonschema diff --git a/utils/relic.py b/utils/relic.py index e62a10dd..5b2432ac 100644 --- a/utils/relic.py +++ b/utils/relic.py @@ -218,12 +218,12 @@ def equip_loadout(self, relics_hash:list[str]): 参数: :param relics_hash: 遗器配装哈希值列表 """ - equip_pos = [(4,13),(9,13),(13,13),(18,13),(23,13),(27,13)] if IS_PC else [(5,14),(11,14),(17,14),(23,14),(28,14),(34,14)] + equip_pos_list = [(4,13),(9,13),(13,13),(18,13),(23,13),(27,13)] if IS_PC else [(5,14),(11,14),(17,14),(23,14),(28,14),(34,14)] pre_relic_set_index = -1 - for equip_indx in range(6): # 遗器部位循环 + for equip_indx, equip_pos in enumerate(equip_pos_list): # 遗器部位循环 # 选择部位 log.info(_(f"选择部位:{self.equip_set_name[equip_indx]}")) - self.calculated.relative_click(equip_pos[equip_indx]) + self.calculated.relative_click(equip_pos) time.sleep(0.5) # 筛选遗器 (加快遗器搜索) tmp_hash = relics_hash[equip_indx]