From 2e303ef32623d2c30059a25b882b20e1f62482a1 Mon Sep 17 00:00:00 2001 From: KirisameVanilla Date: Sat, 25 Jan 2025 15:20:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20event.py=E4=B8=8D=E4=BC=9A=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E6=8E=89=E8=90=BD=E6=95=B0,=20=E5=AF=B9=E8=83=96?= =?UTF-8?q?=E6=AC=A1=E6=B4=BB=E5=8A=A8=E7=9A=84=E5=88=A4=E6=96=AD=E4=BC=9A?= =?UTF-8?q?=E4=BF=9D=E6=8C=81True?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autowsgr/__init__.py | 2 +- autowsgr/game/get_game_info.py | 5 +++-- autowsgr/timer/timer.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/autowsgr/__init__.py b/autowsgr/__init__.py index 96e3ce8..8e3c933 100644 --- a/autowsgr/__init__.py +++ b/autowsgr/__init__.py @@ -1 +1 @@ -__version__ = '1.4.0' +__version__ = '1.4.1' diff --git a/autowsgr/game/get_game_info.py b/autowsgr/game/get_game_info.py index ef9f799..c638b0c 100644 --- a/autowsgr/game/get_game_info.py +++ b/autowsgr/game/get_game_info.py @@ -143,12 +143,13 @@ def get_loot_and_ship(timer: Timer): try: timer.got_loot_num = ret.get('loot') if timer.got_loot_num is None: - timer.can_get_loot = False timer.got_loot_num = 0 + else: + timer.can_get_loot = True except: timer.logger.warning('赋值给got_loot_num失败') - timer.can_get_loot = False timer.got_loot_num = 0 + timer.logger.info(f'已掉落舰船:{timer.got_ship_num}') if timer.can_get_loot: timer.logger.info(f'已掉落胖次:{timer.got_loot_num}') diff --git a/autowsgr/timer/timer.py b/autowsgr/timer/timer.py index bccec41..7855607 100644 --- a/autowsgr/timer/timer.py +++ b/autowsgr/timer/timer.py @@ -40,7 +40,7 @@ def __init__(self, config: UserConfig, logger: Logger) -> None: self.got_ship_num = 0 # 当天已掉落的船 self.got_loot_num = 0 # 当天已掉落的胖次 self.quick_repaired_cost = 0 # 消耗快修数量 - self.can_get_loot = True # 是否可以捞胖次 + self.can_get_loot = False # 是否可以捞胖次 """ 以上时能用到的 以下是暂时用不到的