Просмотр исходного кода

替换UI返回按钮:将蓝色返回按钮替换为黄色返回按钮

- 在Exploration/base.py中替换I_UI_BACK_BLUE为I_UI_BACK_YELLOW
- 在Component/Summon/summon.py中替换I_UI_BACK_BLUE为I_UI_BACK_YELLOW
- 在WantedQuests/script_task.py中替换I_UI_BACK_BLUE为I_UI_BACK_YELLOW
- 在Secret/script_task.py中替换I_UI_BACK_BLUE为I_UI_BACK_YELLOW
- 在GoryouRealm/script_task.py中替换I_UI_BACK_BLUE为I_UI_BACK_YELLOW
- 在AreaBoss/script_task.py中使用全局I_UI_BACK_YELLOW替换I_BACK_BLUE
- 在AreaBoss/assets.py中删除I_BACK_BLUE定义

这些修改是为了适配游戏的UI更新,确保所有模块使用统一的黄色返回按钮。
liuhuayi 10 месяцев назад
Родитель
Сommit
409e88f87e

+ 0 - 2
tasks/AreaBoss/assets.py

@@ -61,8 +61,6 @@ class AreaBossAssets:
 	I_EXPLORE = RuleImage(roi_front=(758,122,66,77), roi_back=(339,104,836,120), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/res_explore.png")
 	# 地狱鬼王图标 
 	I_AREA_BOSS = RuleImage(roi_front=(639,636,65,68), roi_back=(606,619,145,100), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/res_area_boss.png")
-	# 蓝色的返回 
-	I_BACK_BLUE = RuleImage(roi_front=(51,30,51,52), roi_back=(4,1,128,110), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/res_back_blue.png")
 	# 右上边选中鬼王的 
 	I_FILTER = RuleImage(roi_front=(1116,33,35,31), roi_back=(1076,19,98,78), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/res_filter.png")
 	# 除悬赏外 选中第一个鬼王的 

+ 1 - 1
tasks/AreaBoss/script_task.py

@@ -84,7 +84,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         logger.info("Script back home")
         while 1:
             self.screenshot()
-            if self.appear_then_click(self.I_BACK_BLUE, threshold=0.6, interval=2):
+            if self.appear_then_click(self.I_UI_BACK_YELLOW, threshold=0.6, interval=2):
                 continue
             if self.appear(self.I_CHECK_MAIN, threshold=0.6):
                 break

+ 1 - 1
tasks/Component/Summon/summon.py

@@ -143,7 +143,7 @@ class Summon(BaseTask, SummonAssets):
             self.screenshot()
             if self.appear(self.I_BLUE_TICKET):
                 break
-            if self.appear_then_click(self.I_UI_BACK_BLUE):
+            if self.appear_then_click(self.I_UI_BACK_YELLOW):
                 continue
             if self.appear_then_click(self.I_UI_BACK_YELLOW):
                 continue

+ 1 - 1
tasks/Exploration/base.py

@@ -360,7 +360,7 @@ class BaseExploration(GameUi, GeneralBattle, GeneralRoom, GeneralInvite, Replace
                 continue
             if self.appear(self.I_EXPLORATION_TITLE) or self.appear(self.I_CHECK_EXPLORATION):
                 continue
-            if self.appear_then_click(self.I_UI_BACK_BLUE, interval=3.5):
+            if self.appear_then_click(self.I_UI_BACK_YELLOW, interval=3.5):
                 continue
 
     def fire(self, button) -> bool:

+ 1 - 1
tasks/GoryouRealm/script_task.py

@@ -71,7 +71,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, GoryouRealmAssets):
                     break
 
 
-        self.ui_click(self.I_UI_BACK_BLUE, self.I_CHECK_EXPLORATION)
+        self.ui_click(self.I_UI_BACK_YELLOW, self.I_CHECK_EXPLORATION)
         logger.info('Back to exploration')
         self.set_next_run(task='GoryouRealm', success=True, finish=True)
         raise TaskEnd

+ 1 - 1
tasks/Secret/script_task.py

@@ -128,7 +128,7 @@ class ScriptTask(GameUi, GeneralBattle, SwitchSoul, SecretAssets):
                 success = self.run_general_battle(self.battle_config)
                 continue
 
-        self.ui_click(self.I_UI_BACK_BLUE, self.I_CHECK_MAIN)
+        self.ui_click(self.I_UI_BACK_YELLOW, self.I_CHECK_MAIN)
         self.ui_get_current_page()
         self.ui_goto(page_main)
         if con.secret_gold_50 or con.secret_gold_100:

+ 1 - 1
tasks/WantedQuests/script_task.py

@@ -438,7 +438,7 @@ class ScriptTask(WQExplore, SecretScriptTask, WantedQuestsAssets):
                 break
             if self.appear_then_click(self.I_UI_BACK_RED, interval=1):
                 continue
-            if self.appear_then_click(self.I_UI_BACK_BLUE, interval=1.5):
+            if self.appear_then_click(self.I_UI_BACK_YELLOW, interval=1.5):
                 continue
         logger.info('Secret mission finished')