mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-29 02:57:25 +00:00
Fix: Dont call BattlePass if it's already leveled max
This commit is contained in:
parent
28081361d9
commit
3eec7ef0da
@ -505,6 +505,9 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
TaskEnd: Call task `BattlePass` and stop current task
|
||||
"""
|
||||
if self.stored.BattlePassTodayQuest.is_expired():
|
||||
if self.stored.BattlePassLevel.is_full():
|
||||
logger.info('BattlePassLevel full, no updates')
|
||||
else:
|
||||
logger.info('BattlePassTodayQuest expired, call task to update')
|
||||
self.task_call('BattlePass')
|
||||
self.task_stop()
|
||||
|
@ -69,6 +69,9 @@ class Assignment(AssignmentClaim, SynthesizeUI):
|
||||
if KEYWORD_BATTLE_PASS_QUEST.Dispatch_1_assignments in quests:
|
||||
logger.info(
|
||||
'Achieved battle pass quest Dispatch_1_assignments')
|
||||
if self.config.stored.BattlePassLevel.is_full():
|
||||
logger.info('BattlePassLevel full, no task call')
|
||||
else:
|
||||
self.config.task_call('BattlePass')
|
||||
# Check daily
|
||||
quests = self.config.stored.DailyQuest.load_quests()
|
||||
|
@ -323,7 +323,16 @@ class DailyQuestUI(DungeonUI, RouteLoader):
|
||||
quests = self.config.stored.BattlePassTodayQuest.load_quests()
|
||||
if KEYWORD_BATTLE_PASS_QUEST.Reach_500_on_Daily_Training_Activity in quests:
|
||||
logger.info('Achieved battle pass quest Reach_500_on_Daily_Training_Activity')
|
||||
if self.config.stored.BattlePassLevel.is_full():
|
||||
logger.info('BattlePassLevel full, no task call')
|
||||
else:
|
||||
self.config.task_call('BattlePass')
|
||||
self.config.task_call('DataUpdate')
|
||||
# Delay self
|
||||
self.config.task_delay(server_update=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
self = DailyQuestUI('src')
|
||||
self.device.screenshot()
|
||||
self.route_run(ROUTE_DAILY.HimekoTrial__route_enemy)
|
||||
|
@ -229,6 +229,9 @@ class Dungeon(DungeonUI, DungeonEvent, Combat):
|
||||
quests = self.config.stored.BattlePassTodayQuest.load_quests()
|
||||
if KEYWORD_BATTLE_PASS_QUEST.Consume_1_Trailblaze_Power in quests:
|
||||
logger.info('Probably achieved battle pass quest Consume_1_Trailblaze_Power')
|
||||
if self.config.stored.BattlePassLevel.is_full():
|
||||
logger.info('BattlePassLevel full, no task call')
|
||||
else:
|
||||
self.config.task_call('BattlePass')
|
||||
# Check daily
|
||||
if self.achieved_daily_quest:
|
||||
|
Loading…
Reference in New Issue
Block a user