Skip to content

Commit

Permalink
当寮突未开,且自身不是管理员,但是配置里误配了管理时,不应该进入开启寮突的逻辑,否则会卡死
Browse files Browse the repository at this point in the history
  • Loading branch information
yiliangxiajiao committed Aug 30, 2024
1 parent 0ec7da5 commit 6b0aba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/RyouToppa/script_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def run(self):
self.ui_goto(page_kekkai_toppa)
ryou_toppa_start_flag = True
ryou_toppa_success_penetration = False
ryou_toppa_admin_flag = False
# 点击突破
while 1:
self.screenshot()
Expand All @@ -117,6 +118,7 @@ def run(self):
# 出现选择寮突说明寮突未开
elif self.appear(self.I_SELECT_RYOU_BUTTON, threshold=0.8):
ryou_toppa_start_flag = False
ryou_toppa_admin_flag = True
break
# 出现晴明说明寮突未开
elif self.appear(self.I_NO_SELECT_RYOU, threshold=0.8):
Expand All @@ -131,7 +133,7 @@ def run(self):
logger.attr('ryou_toppa_success_penetration', ryou_toppa_success_penetration)
# 寮突未开 并且有权限, 开开寮突,没有权限则标记失败
if not ryou_toppa_start_flag:
if ryou_config.raid_config.ryou_access:
if ryou_config.raid_config.ryou_access and ryou_toppa_admin_flag:
# 作为寮管理,开启今天的寮突
logger.info("As the manager of the ryou, try to start ryou toppa.")
self.start_ryou_toppa()
Expand Down

0 comments on commit 6b0aba3

Please sign in to comment.