Explorar o código

fix: page switch pop-up

runhey %!s(int64=3) %!d(string=hai) anos
pai
achega
b4cff9b2de

+ 1 - 1
tasks/ActivityShikigami/assets.py

@@ -41,7 +41,7 @@ class ActivityShikigamiAssets:
 
 
 	# Ocr Rule Assets
 	# Ocr Rule Assets
 	# 体力的数量检测 
 	# 体力的数量检测 
-	O_REMAIN_AP = RuleOcr(roi=(1113,671,97,30), area=(1113,671,97,30), mode="DigitCounter", method="Default", keyword="", name="remain_ap")
+	O_REMAIN_AP = RuleOcr(roi=(1120,671,90,30), area=(1120,671,90,30), mode="DigitCounter", method="Default", keyword="", name="remain_ap")
 	# 活动体力的剩余检测 
 	# 活动体力的剩余检测 
 	O_REMAIN_AP_ACTIVITY = RuleOcr(roi=(884,20,106,34), area=(884,20,106,34), mode="DigitCounter", method="Default", keyword="", name="remain_ap_activity")
 	O_REMAIN_AP_ACTIVITY = RuleOcr(roi=(884,20,106,34), area=(884,20,106,34), mode="DigitCounter", method="Default", keyword="", name="remain_ap_activity")
 	# 还有多少次购买体力的机会 
 	# 还有多少次购买体力的机会 

+ 4 - 1
tasks/DailyTrifles/script_task.py

@@ -53,10 +53,12 @@ class ScriptTask(GameUi, Summon, DailyTriflesAssets):
         self.screenshot()
         self.screenshot()
         if not self.appear(self.I_L_COLLECT):
         if not self.appear(self.I_L_COLLECT):
             logger.warning('There is no any love')
             logger.warning('There is no any love')
+            self.ui_click(self.I_UI_BACK_RED, self.I_CHECK_MAIN)
             return
             return
         if self.ui_get_reward(self.I_L_COLLECT):
         if self.ui_get_reward(self.I_L_COLLECT):
             logger.info('Get reward of friend love')
             logger.info('Get reward of friend love')
 
 
+        self.ui_click(self.I_UI_BACK_RED, self.I_CHECK_MAIN)
 
 
     def run_store_sign(self):
     def run_store_sign(self):
         self.ui_get_current_page()
         self.ui_get_current_page()
@@ -82,6 +84,7 @@ class ScriptTask(GameUi, Summon, DailyTriflesAssets):
         if self.ui_get_reward(self.I_GIFT_SIGN):
         if self.ui_get_reward(self.I_GIFT_SIGN):
             logger.info('Get reward of gift sign')
             logger.info('Get reward of gift sign')
 
 
+        self.ui_click(self.I_UI_BACK_YELLOW, self.I_CHECK_MALL)
         self.ui_get_current_page()
         self.ui_get_current_page()
         self.ui_goto(page_main)
         self.ui_goto(page_main)
 
 
@@ -98,5 +101,5 @@ if __name__ == '__main__':
     d = Device(c)
     d = Device(c)
     t = ScriptTask(c, d)
     t = ScriptTask(c, d)
 
 
-    t.run_store_sign()
+    t.run_friend_love()
 
 

BIN=BIN
tasks/GameUi/additional/additional_ad_close_red.png


+ 11 - 0
tasks/GameUi/additional/mall.json

@@ -0,0 +1,11 @@
+[
+  {
+    "itemName": "ad_close_red",
+    "imageName": "additional_ad_close_red.png",
+    "roiFront": "994,128,33,36",
+    "roiBack": "994,128,33,36",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "商店弹窗红色关闭"
+  }
+]

+ 6 - 1
tasks/GameUi/assets.py

@@ -10,6 +10,11 @@ from module.atom.list import RuleList
 class GameUiAssets: 
 class GameUiAssets: 
 
 
 
 
+	# Image Rule Assets
+	# 商店弹窗红色关闭 
+	I_AD_CLOSE_RED = RuleImage(roi_front=(994,128,33,36), roi_back=(994,128,33,36), threshold=0.8, method="Template matching", file="./tasks/GameUi/additional/additional_ad_close_red.png")
+
+
 	# Image Rule Assets
 	# Image Rule Assets
 	# description 
 	# description 
 	I_AD_DISAPPEAR = RuleImage(roi_front=(412,405,37,40), roi_back=(412,405,37,40), threshold=0.9, method="Template matching", file="./tasks/GameUi/additional/additional_ad_disappear.png")
 	I_AD_DISAPPEAR = RuleImage(roi_front=(412,405,37,40), roi_back=(412,405,37,40), threshold=0.9, method="Template matching", file="./tasks/GameUi/additional/additional_ad_disappear.png")
@@ -131,7 +136,7 @@ class GameUiAssets:
 	# description 
 	# description 
 	I_CHECK_DAILY = RuleImage(roi_front=(28,510,69,87), roi_back=(28,510,69,87), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_daily.png")
 	I_CHECK_DAILY = RuleImage(roi_front=(28,510,69,87), roi_back=(28,510,69,87), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_daily.png")
 	# description 
 	# description 
-	I_CHECK_MALL = RuleImage(roi_front=(7,503,100,100), roi_back=(7,503,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_mall.png")
+	I_CHECK_MALL = RuleImage(roi_front=(239,502,100,100), roi_back=(239,502,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_mall.png")
 	# description 
 	# description 
 	I_CHECK_GUILD = RuleImage(roi_front=(1072,630,49,46), roi_back=(1072,630,49,46), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_guild.png")
 	I_CHECK_GUILD = RuleImage(roi_front=(1072,630,49,46), roi_back=(1072,630,49,46), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_guild.png")
 	# description 
 	# description 

+ 1 - 0
tasks/GameUi/page.py

@@ -137,6 +137,7 @@ page_daily.link(button=G.I_BACK_Y, destination=page_main)
 page_main.link(button=G.I_MAIN_GOTO_DAILY, destination=page_daily)
 page_main.link(button=G.I_MAIN_GOTO_DAILY, destination=page_daily)
 # 商店 mall
 # 商店 mall
 page_mall = Page(G.I_CHECK_MALL)
 page_mall = Page(G.I_CHECK_MALL)
+page_mall.additional = [G.I_AD_CLOSE_RED]
 page_mall.link(button=G.I_BACK_BLUE, destination=page_main)
 page_mall.link(button=G.I_BACK_BLUE, destination=page_main)
 page_main.link(button=G.I_MAIN_GOTO_MALL, destination=page_mall)
 page_main.link(button=G.I_MAIN_GOTO_MALL, destination=page_mall)
 # 阴阳寮 guild
 # 阴阳寮 guild

BIN=BIN
tasks/GameUi/page/page_check_mall.png


+ 2 - 2
tasks/GameUi/page/page_img_3.json

@@ -110,8 +110,8 @@
   {
   {
     "itemName": "check_mall",
     "itemName": "check_mall",
     "imageName": "page_check_mall.png",
     "imageName": "page_check_mall.png",
-    "roiFront": "7,503,100,100",
-    "roiBack": "7,503,100,100",
+    "roiFront": "239,502,100,100",
+    "roiBack": "239,502,100,100",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"