Sfoglia il codice sorgente

feat(Restart): Login Exception

Neptine 1 anno fa
parent
commit
a0812e4e95

+ 2 - 0
tasks/Restart/assets.py

@@ -87,6 +87,8 @@ class RestartAssets:
 	I_LOGIN_LOGIN_ONMYOJI_GENIE = RuleImage(roi_front=(80,110,280,120), roi_back=(80,110,280,120), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_onmyoji_genie.png")
 	# 已有角色 
 	I_CHARACTARS = RuleImage(roi_front=(246,535,100,31), roi_back=(219,523,173,57), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_charactars.png")
+	# description 
+	I_CREATE_ACCOUNT = RuleImage(roi_front=(555,636,169,52), roi_back=(504,614,263,100), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_create_account.png")
 
 
 	# Ocr Rule Assets

+ 5 - 0
tasks/Restart/login.py

@@ -106,6 +106,11 @@ class LoginHandler(BaseTask, RestartAssets):
                     break
                 logger.info('login specific user')
                 continue
+            
+            # 创建角色, 误入新区直接重启
+            if self.appear(self.I_CREATE_ACCOUNT):
+                logger.warning('Appear create account')
+                raise GameStuckError('Appear create account')
             # 点击’进入游戏‘
             if not self.appear(self.I_LOGIN_8):
                 continue

+ 9 - 0
tasks/Restart/login/image.json

@@ -115,5 +115,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "已有角色"
+  },
+  {
+    "itemName": "create_account",
+    "imageName": "login_create_account.png",
+    "roiFront": "555,636,169,52",
+    "roiBack": "504,614,263,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
 ]

BIN
tasks/Restart/login/login_create_account.png