mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Catch game died in camera update
This commit is contained in:
parent
f8d9b31386
commit
998a57bb09
@ -151,7 +151,7 @@ class InfoHandler(ModuleBase):
|
||||
self._hot_fix_check_wait.clear()
|
||||
if self._hot_fix_check_wait.started() and 3 <= self._hot_fix_check_wait.current() <= 6:
|
||||
if not self.device.app_is_running():
|
||||
logger.warning('Detected hot fixes from game server, game died')
|
||||
logger.error('Detected hot fixes from game server, game died')
|
||||
raise GameNotRunningError
|
||||
self._hot_fix_check_wait.clear()
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import numpy as np
|
||||
from module.base.timer import Timer
|
||||
from module.base.utils import area_offset
|
||||
from module.combat.assets import GET_ITEMS_1, GET_ITEMS_1_RYZA
|
||||
from module.exception import CampaignEnd, MapDetectionError
|
||||
from module.exception import CampaignEnd, GameNotRunningError, MapDetectionError
|
||||
from module.handler.assets import AUTO_SEARCH_MENU_CONTINUE, GAME_TIPS
|
||||
from module.logger import logger
|
||||
from module.map.map_base import CampaignMap, location2node
|
||||
@ -179,6 +179,10 @@ class Camera(MapOperation):
|
||||
logger.warning(string)
|
||||
x, y = string.split('=')[1].strip('() ').split(',')
|
||||
self._map_swipe((-int(x.strip()), -int(y.strip())))
|
||||
# Finally check if game is alive
|
||||
elif not self.device.app_is_running():
|
||||
logger.error('Trying to update camera but game died')
|
||||
raise GameNotRunningError
|
||||
else:
|
||||
raise e
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user