mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Opt: Avoid update dungeon double twice
This commit is contained in:
parent
4591497de1
commit
8de65f2c98
@ -1,5 +1,8 @@
|
||||
from datetime import timedelta
|
||||
|
||||
from module.base.decorator import set_cached_property
|
||||
from module.base.utils import area_offset
|
||||
from module.config.stored.classes import now
|
||||
from module.logger import logger
|
||||
from tasks.battle_pass.keywords import KEYWORDS_BATTLE_PASS_QUEST
|
||||
from tasks.combat.combat import Combat
|
||||
@ -228,6 +231,10 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat):
|
||||
or self.config.stored.DungeonDouble.calyx > 0
|
||||
or self.config.stored.DungeonDouble.relic > 0
|
||||
or self.config.stored.DungeonDouble.rogue > 0):
|
||||
update = self.config.stored.DungeonDouble.time
|
||||
if update <= now() <= update + timedelta(seconds=5):
|
||||
logger.info('Dungeon double just updated, skip')
|
||||
return
|
||||
logger.info('Get dungeon double remains')
|
||||
# UI switches
|
||||
switched = self.dungeon_tab_goto(KEYWORDS_DUNGEON_TAB.Survival_Index)
|
||||
|
Loading…
Reference in New Issue
Block a user