diff --git a/assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png b/assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png index 53ece541f..c083b5862 100644 Binary files a/assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png and b/assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png differ diff --git a/assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png b/assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png index 051cfb605..169662893 100644 Binary files a/assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png and b/assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png differ diff --git a/module/smallevent/assets.py b/module/smallevent/assets.py index 02cdbd116..d69c44c32 100644 --- a/module/smallevent/assets.py +++ b/module/smallevent/assets.py @@ -13,8 +13,8 @@ ACTIVITY_SELECTED_GRID = Button(area={'cn': (4, 241, 30, 344), 'en': (4, 241, 30 EVENT_NOTIFY_ENTRY = Button(area={'cn': (1182, 164, 1258, 186), 'en': (1182, 164, 1258, 186), 'jp': (1182, 164, 1258, 186), 'tw': (1182, 164, 1258, 186)}, color={'cn': (110, 112, 115), 'en': (110, 112, 115), 'jp': (110, 112, 115), 'tw': (110, 112, 115)}, button={'cn': (1182, 164, 1258, 186), 'en': (1182, 164, 1258, 186), 'jp': (1182, 164, 1258, 186), 'tw': (1182, 164, 1258, 186)}, file={'cn': './assets/cn/smallevent/EVENT_NOTIFY_ENTRY.png', 'en': './assets/cn/smallevent/EVENT_NOTIFY_ENTRY.png', 'jp': './assets/cn/smallevent/EVENT_NOTIFY_ENTRY.png', 'tw': './assets/cn/smallevent/EVENT_NOTIFY_ENTRY.png'}) EVENT_NOTIFY_PAGE = Button(area={'cn': (117, 9, 337, 46), 'en': (117, 9, 337, 46), 'jp': (117, 9, 337, 46), 'tw': (117, 9, 337, 46)}, color={'cn': (82, 90, 118), 'en': (82, 90, 118), 'jp': (82, 90, 118), 'tw': (82, 90, 118)}, button={'cn': (117, 9, 337, 46), 'en': (117, 9, 337, 46), 'jp': (117, 9, 337, 46), 'tw': (117, 9, 337, 46)}, file={'cn': './assets/cn/smallevent/EVENT_NOTIFY_PAGE.png', 'en': './assets/cn/smallevent/EVENT_NOTIFY_PAGE.png', 'jp': './assets/cn/smallevent/EVENT_NOTIFY_PAGE.png', 'tw': './assets/cn/smallevent/EVENT_NOTIFY_PAGE.png'}) EVENT_PREPARE_ENTRY = Button(area={'cn': (1077, 165, 1145, 188), 'en': (1077, 165, 1145, 188), 'jp': (1077, 165, 1145, 188), 'tw': (1077, 165, 1145, 188)}, color={'cn': (125, 126, 129), 'en': (125, 126, 129), 'jp': (125, 126, 129), 'tw': (125, 126, 129)}, button={'cn': (1077, 165, 1145, 188), 'en': (1077, 165, 1145, 188), 'jp': (1077, 165, 1145, 188), 'tw': (1077, 165, 1145, 188)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_ENTRY.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_ENTRY.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_ENTRY.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_ENTRY.png'}) -EVENT_PREPARE_ENTRY_2 = Button(area={'cn': (1073, 165, 1147, 186), 'en': (1073, 165, 1147, 186), 'jp': (1073, 165, 1147, 186), 'tw': (1073, 165, 1147, 186)}, color={'cn': (127, 126, 130), 'en': (127, 126, 130), 'jp': (127, 126, 130), 'tw': (127, 126, 130)}, button={'cn': (1073, 165, 1147, 186), 'en': (1073, 165, 1147, 186), 'jp': (1073, 165, 1147, 186), 'tw': (1073, 165, 1147, 186)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png'}) -EVENT_PREPARE_ENTRY_3 = Button(area={'cn': (967, 165, 1036, 185), 'en': (967, 165, 1036, 185), 'jp': (967, 165, 1036, 185), 'tw': (967, 165, 1036, 185)}, color={'cn': (127, 126, 128), 'en': (127, 126, 128), 'jp': (127, 126, 128), 'tw': (127, 126, 128)}, button={'cn': (967, 165, 1036, 185), 'en': (967, 165, 1036, 185), 'jp': (967, 165, 1036, 185), 'tw': (967, 165, 1036, 185)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png'}) +EVENT_PREPARE_ENTRY_2 = Button(area={'cn': (1147, 152, 1152, 186), 'en': (1147, 152, 1152, 186), 'jp': (1147, 152, 1152, 186), 'tw': (1147, 152, 1152, 186)}, color={'cn': (143, 144, 146), 'en': (143, 144, 146), 'jp': (143, 144, 146), 'tw': (143, 144, 146)}, button={'cn': (1147, 152, 1152, 186), 'en': (1147, 152, 1152, 186), 'jp': (1147, 152, 1152, 186), 'tw': (1147, 152, 1152, 186)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_2.png'}) +EVENT_PREPARE_ENTRY_3 = Button(area={'cn': (1037, 154, 1041, 186), 'en': (1037, 154, 1041, 186), 'jp': (1037, 154, 1041, 186), 'tw': (1037, 154, 1041, 186)}, color={'cn': (122, 123, 127), 'en': (122, 123, 127), 'jp': (122, 123, 127), 'tw': (122, 123, 127)}, button={'cn': (1037, 154, 1041, 186), 'en': (1037, 154, 1041, 186), 'jp': (1037, 154, 1041, 186), 'tw': (1037, 154, 1041, 186)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_ENTRY_3.png'}) EVENT_PREPARE_PAGE = Button(area={'cn': (92, 18, 213, 48), 'en': (92, 18, 213, 48), 'jp': (92, 18, 213, 48), 'tw': (92, 18, 213, 48)}, color={'cn': (100, 105, 116), 'en': (100, 105, 116), 'jp': (100, 105, 116), 'tw': (100, 105, 116)}, button={'cn': (92, 18, 213, 48), 'en': (92, 18, 213, 48), 'jp': (92, 18, 213, 48), 'tw': (92, 18, 213, 48)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_PAGE.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_PAGE.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_PAGE.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_PAGE.png'}) EVENT_PREPARE_PAGE_2 = Button(area={'cn': (87, 3, 221, 68), 'en': (87, 3, 221, 68), 'jp': (87, 3, 221, 68), 'tw': (87, 3, 221, 68)}, color={'cn': (85, 88, 97), 'en': (85, 88, 97), 'jp': (85, 88, 97), 'tw': (85, 88, 97)}, button={'cn': (87, 3, 221, 68), 'en': (87, 3, 221, 68), 'jp': (87, 3, 221, 68), 'tw': (87, 3, 221, 68)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_PAGE_2.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_PAGE_2.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_PAGE_2.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_PAGE_2.png'}) EVENT_PREPARE_PAGE_3 = Button(area={'cn': (96, 21, 221, 58), 'en': (96, 21, 221, 58), 'jp': (96, 21, 221, 58), 'tw': (96, 21, 221, 58)}, color={'cn': (79, 85, 96), 'en': (79, 85, 96), 'jp': (79, 85, 96), 'tw': (79, 85, 96)}, button={'cn': (96, 21, 221, 58), 'en': (96, 21, 221, 58), 'jp': (96, 21, 221, 58), 'tw': (96, 21, 221, 58)}, file={'cn': './assets/cn/smallevent/EVENT_PREPARE_PAGE_3.png', 'en': './assets/cn/smallevent/EVENT_PREPARE_PAGE_3.png', 'jp': './assets/cn/smallevent/EVENT_PREPARE_PAGE_3.png', 'tw': './assets/cn/smallevent/EVENT_PREPARE_PAGE_3.png'}) diff --git a/module/smallevent/samllevent.py b/module/smallevent/samllevent.py index 349ef65e4..6edd04deb 100644 --- a/module/smallevent/samllevent.py +++ b/module/smallevent/samllevent.py @@ -393,7 +393,7 @@ class SmallEvent(UI): break return False,None - def goto_sevenD_page_general(self,page_area,orc_api,button_text,exclude_text,entry_index=2,entry_text=None,page_text=None,skip_first_screenshot=True): + def goto_sevenD_page_general(self,page_area,orc_api,button_text,exclude_text,entry_index=2,page_text=None,skip_first_screenshot=True): #for the event prepare page 从左到右第二个入口/通用入口 self.ui_ensure(page_main) NOCLICK_COUNT = 0 @@ -411,8 +411,13 @@ class SmallEvent(UI): skip_first_screenshot = False else: self.device.screenshot() - if not entried and entry_text in entry_ocr.ocr(self.device.image): - logger.info(f"发现{entry_text}入口") + # if not entried and entry_text in entry_ocr.ocr(self.device.image): + # logger.info(f"发现{entry_text}入口") + # self.device.click(entry_button) + # entried = True + # continue + if self.appear(entry_button, offset=(5, 5), interval=3): + logger.info(f"发现{entry_button_name}入口") self.device.click(entry_button) entried = True continue @@ -647,7 +652,7 @@ class SmallEvent(UI): #第二栏 page_area = (0, 0, 1280, 720) goPage_result = self.goto_sevenD_page_general(page_area,ORC_API, - button_text="致美好世界",exclude_text=["无"],entry_index=3,entry_text="作战准备",page_text="活动汇总") + button_text="致美好世界",exclude_text=["无"],entry_index=3,page_text="活动汇总") self.sevenD_harvest(page_area,ORC_API,goPage_result) # page_area = (0, 0, 1280, 720) # self.sevenD_harvest(page_area,ORC_API,goto_sevenD_page_func=self.goto_sevenD_page_v3,