0
0
mirror of https://github.com/ok-oldking/ok-wuthering-waves.git synced 2025-06-06 17:05:54 +00:00

增加加载等待时间

优化声骸文字识别速度
This commit is contained in:
firedcto@gmail.com 2024-08-08 12:38:36 +08:00
parent dce893d02f
commit 3387da7040
3 changed files with 5 additions and 5 deletions

View File

@ -88,7 +88,7 @@ class BaseWWTask(BaseTask, FindFeature, OCR):
if f and target_text: if f and target_text:
search_text_box = f.copy(x_offset=f.width * 5, width_offset=f.width * 7, height_offset=1.5 * f.height, search_text_box = f.copy(x_offset=f.width * 5, width_offset=f.width * 7, height_offset=1.5 * f.height,
y_offset=-0.8 * f.height, name='search_text_box') y_offset=-0.8 * f.height, name='search_text_box')
text = self.ocr(box=search_text_box, match=target_text) text = self.ocr(box=search_text_box, match=target_text, target_height=540)
logger.debug(f'found f with text {text}, target_text {target_text}') logger.debug(f'found f with text {text}, target_text {target_text}')
if not text: if not text:
return None return None

View File

@ -59,11 +59,11 @@ class FarmEchoTask(BaseCombatTask):
self.send_key('esc') self.send_key('esc')
self.wait_click_feature('gray_confirm_exit_button', relative_x=-1, raise_if_not_found=True, self.wait_click_feature('gray_confirm_exit_button', relative_x=-1, raise_if_not_found=True,
use_gray_scale=True) use_gray_scale=True)
self.wait_in_team_and_world(time_out=40) self.wait_in_team_and_world(time_out=120)
self.sleep(4) self.sleep(4)
if self.config.get('Entrance Direction') == 'Backward': if self.config.get('Entrance Direction') == 'Backward':
self.send_key('a', down_time=0.2) # Jue self.right_click() # Jue
self.sleep(1) self.sleep(3)
def incr_drop(self, dropped): def incr_drop(self, dropped):
if dropped: if dropped:

View File

@ -96,7 +96,7 @@ class FarmWorldBossTask(BaseCombatTask):
self.wait_click_feature('gray_custom_way_point', box=self.box_of_screen(0.62, 0.48, 0.70, 0.86), self.wait_click_feature('gray_custom_way_point', box=self.box_of_screen(0.62, 0.48, 0.70, 0.86),
raise_if_not_found=True, threshold=0.75, time_out=2) raise_if_not_found=True, threshold=0.75, time_out=2)
self.click_fast_travel() self.click_fast_travel()
self.wait_in_team_and_world(time_out=30) self.wait_in_team_and_world(time_out=120)
def click_fast_travel(self): def click_fast_travel(self):
travel = self.wait_feature('fast_travel_custom', raise_if_not_found=True, threshold=0.75) travel = self.wait_feature('fast_travel_custom', raise_if_not_found=True, threshold=0.75)