mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 01:38:21 +08:00
Fix: Handle random battle status detection error
This commit is contained in:
@@ -246,7 +246,9 @@ class Combat(Combat_, MapEventHandler):
|
||||
|
||||
if self.handle_submarine_call(submarine_mode):
|
||||
continue
|
||||
if self.handle_os_auto_search_map_option(drop=drop, enable=success):
|
||||
# Don't change auto search option if failed
|
||||
enable = success if success is not None else None
|
||||
if self.handle_os_auto_search_map_option(drop=drop, enable=enable):
|
||||
continue
|
||||
|
||||
# End
|
||||
|
||||
@@ -226,7 +226,7 @@ class MapEventHandler(EnemySearchingHandler):
|
||||
"""
|
||||
Args:
|
||||
drop (DropImage):
|
||||
enable (bool):
|
||||
enable (bool): True/False, or None for doing nothing.
|
||||
|
||||
Returns:
|
||||
bool: If clicked.
|
||||
@@ -246,6 +246,8 @@ class MapEventHandler(EnemySearchingHandler):
|
||||
# Auto search stopped but map hasn't been cleared
|
||||
return True
|
||||
|
||||
if enable is None:
|
||||
pass
|
||||
elif enable:
|
||||
if self.appear(AUTO_SEARCH_OS_MAP_OPTION_OFF, offset=(5, 120), interval=3) \
|
||||
and AUTO_SEARCH_OS_MAP_OPTION_OFF.match_appear_on(self.device.image):
|
||||
|
||||
Reference in New Issue
Block a user