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

修复永生之海队长打满次数后无法正常结束任务的问题

永生之海房间左下角是式神录+发言按钮, 没有普通房间的表情按钮,
is_in_room识别不到导致exit_room直接跳过, 之后ui_get_current_page
在房间界面无法识别页面报GamePageUnknownError。新增发言按钮识别图
I_GI_SPEAK并加入is_in_room判断。
lhye 2 месяцев назад
Родитель
Сommit
c468026414

+ 2 - 0
tasks/Component/GeneralInvite/assets.py

@@ -95,6 +95,8 @@ class GeneralInviteAssets:
 	I_BACK_YELLOW_SEA = RuleImage(roi_front=(31,16,42,42), roi_back=(31,16,42,42), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_back_yellow_sea.png")
 	# 识别到寄养邀请 
 	I_I_ACCEPT_JY = RuleImage(roi_front=(248,258,46,25), roi_back=(231,205,75,326), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_i_accept_jy.png")
+	# 房间左下角发言按钮(永生之海房间无表情按钮, 用此图识别) 
+	I_GI_SPEAK = RuleImage(roi_front=(23,503,82,85), roi_back=(23,503,82,85), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_gi_speak.png")
 
 
 	# Image Rule Assets

+ 3 - 0
tasks/Component/GeneralInvite/general_invite.py

@@ -165,6 +165,9 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
             return True
         if self.appear(self.I_GI_EMOJI_2):
             return True
+        # 永生之海房间没有表情按钮, 用左下角发言按钮识别
+        if self.appear(self.I_GI_SPEAK):
+            return True
         # if self.appear(self.I_MATCHING):
         #     return False
         return False

BIN
tasks/Component/GeneralInvite/gi/gi_gi_speak.png


+ 9 - 0
tasks/Component/GeneralInvite/gi/image.json

@@ -376,5 +376,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "识别到寄养邀请"
+  },
+  {
+    "itemName": "gi_speak",
+    "imageName": "gi_gi_speak.png",
+    "roiFront": "23,503,82,85",
+    "roiBack": "23,503,82,85",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "房间左下角发言按钮(永生之海房间无表情按钮, 用此图识别)"
   }
 ]