StarRailCopilot/module/handler/urgent_commission.py
LmeSzinc 007d14c1d7 Fix: 修复和优化
- 纠正了5-3刷新数据
- 更改出错截图文件名为毫秒时间戳
- 修复了伏击出现时, 仍会识别队伍的情况
- 修复了不开启截图时获得紧急委托时不点击的情况
2020-04-17 17:19:09 +08:00

27 lines
816 B
Python

from module.handler.assets import *
from module.handler.info_bar import InfoBarHandler
from module.logger import logger
class UrgentCommissionHandler(InfoBarHandler):
def handle_urgent_commission(self, save_get_items=None):
"""
Args:
save_get_items (bool):
Returns:
bool:
"""
if save_get_items is None:
save_get_items = self.config.ENABLE_SAVE_GET_ITEMS
appear = self.appear(GET_MISSION, offset=True, interval=2)
if appear:
logger.info('Get urgent commission')
if save_get_items:
if self.handle_info_bar():
self.device.screenshot()
self.device.save_screenshot('get_mission')
self.device.click(GET_MISSION)
return appear