mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-28 18:34:04 +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):
|
if self.handle_submarine_call(submarine_mode):
|
||||||
continue
|
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
|
continue
|
||||||
|
|
||||||
# End
|
# End
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ class MapEventHandler(EnemySearchingHandler):
|
|||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
drop (DropImage):
|
drop (DropImage):
|
||||||
enable (bool):
|
enable (bool): True/False, or None for doing nothing.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: If clicked.
|
bool: If clicked.
|
||||||
@@ -246,6 +246,8 @@ class MapEventHandler(EnemySearchingHandler):
|
|||||||
# Auto search stopped but map hasn't been cleared
|
# Auto search stopped but map hasn't been cleared
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
if enable is None:
|
||||||
|
pass
|
||||||
elif enable:
|
elif enable:
|
||||||
if self.appear(AUTO_SEARCH_OS_MAP_OPTION_OFF, offset=(5, 120), interval=3) \
|
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):
|
and AUTO_SEARCH_OS_MAP_OPTION_OFF.match_appear_on(self.device.image):
|
||||||
|
|||||||
Reference in New Issue
Block a user