0
0
mirror of https://github.com/ok-oldking/ok-wuthering-waves.git synced 2025-04-24 08:25:16 +00:00

修复日常一条龙可能卡住

修复91版本后可能闪退问题 fix #452
This commit is contained in:
firedcto@gmail.com 2025-04-14 18:05:22 +08:00
parent d289a42740
commit 55500510a9
3 changed files with 9 additions and 6 deletions

View File

@ -28,7 +28,7 @@ class OpenVinoYoloDetect: # Renamed class
# --- OpenVINO Initialization ---
self.core = Core()
self.core.set_property("CPU", {"INFERENCE_NUM_THREADS": str(1)})
device = "AUTO" # Default device, tries GPU then CPU etc.
device = "CPU" # Default device, tries GPU then CPU etc.
try:
logger.info(f"Compiling OpenVINO model for {device}...")

View File

@ -660,10 +660,12 @@ class BaseWWTask(BaseTask):
def openF2Book(self, feature="gray_book_all_monsters"):
self.log_info('click f2 to open the book')
self.send_key_down('alt')
self.sleep(0.05)
self.click_relative(0.77, 0.05)
self.send_key_up('alt')
# self.send_key_down('alt')
# self.sleep(0.05)
# self.click_relative(0.77, 0.05)
# self.send_key_up('alt')
self.sleep(1)
self.send_key('f2')
gray_book_boss = self.wait_book(feature)
if not gray_book_boss:
self.log_error("can't find gray_book_boss, make sure f2 is the hotkey for book", notify=True)

View File

@ -72,12 +72,13 @@ class TacetTask(WWOneTimeTask, BaseCombatTask):
return self.not_enough_stamina()
self.wait_click_ocr(0.2, 0.56, 0.75, 0.69, match=[str(used), '确认', 'Confirm'], raise_if_not_found=True, log=True)
self.sleep(4)
self.click(0.51, 0.84, after_sleep=1)
self.click(0.51, 0.84, after_sleep=2)
if remaining_total < 60:
return self.not_enough_stamina(back=False)
if total_used >= 180 and remaining_current == 0:
return self.not_enough_stamina(back=True)
def walk_to_treasure(self, retry=0):
if retry > 4:
raise RuntimeError('walk_to_treasure too many retries!')