From 3eaa5c9bd8ca9a202aeb467221d2d8ce637874bc Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Sun, 17 May 2020 00:22:45 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=E6=88=98=E6=9C=AF?= =?UTF-8?q?=E5=AD=A6=E9=99=A2=E6=8A=80=E8=83=BD=E7=82=B9=E5=A4=AA=E5=BF=AB?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E4=B8=8D=E5=88=B0=E4=B9=A6=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/reward/tactical_class.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/reward/tactical_class.py b/module/reward/tactical_class.py index ebc91160c..53e01e3de 100644 --- a/module/reward/tactical_class.py +++ b/module/reward/tactical_class.py @@ -4,6 +4,7 @@ from scipy import signal from module.base.button import Button, ButtonGrid from module.base.timer import Timer, time_range_active from module.base.utils import area_offset, get_color, color_similar, color_similarity_2d +from module.exception import ScriptError from module.handler.info_handler import InfoHandler from module.logger import logger from module.reward.assets import * @@ -180,6 +181,7 @@ class RewardTacticalClass(UI, InfoHandler): logger.info(f'Book_T{index}: {books.select(tier=index)}') if not books: logger.warning('No book found.') + raise ScriptError('No book found.') if not time_range_active(self.config.TACTICAL_NIGHT_RANGE): tier = self.config.TACTICAL_BOOK_TIER @@ -221,6 +223,8 @@ class RewardTacticalClass(UI, InfoHandler): continue if self.appear(TACTICAL_CLASS_CANCEL, offset=(30, 30), interval=1) \ and self.appear(TACTICAL_CLASS_START, offset=(30, 30)): + self.device.sleep(0.3) + self.device.screenshot() self._tactical_books_choose() self.device.click(TACTICAL_CLASS_START) continue