Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jul 28, 2024
1 parent 122315b commit f19df0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/combat/CombatCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def in_combat(self, rechecked=False):
else:
in_combat = self.target_enemy()
if in_combat:
if not self.boss_lv_template:
if self.boss_lv_template is None:
self.find_boss_lv_text()
logger.info(
f'enter combat cost {(time.time() - start):2f} boss_lv_template:{self.boss_lv_template is not None} boss_health_box:{self.boss_health_box} has_count_down:{self.has_count_down}')
Expand Down
4 changes: 2 additions & 2 deletions src/task/BaseCombatTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def raise_not_in_combat(self, message, exception_type=None):

def combat_once(self, wait_combat_time=180, wait_before=3):
self.wait_until(lambda: self.in_combat(), time_out=wait_combat_time, raise_if_not_found=True)
self.sleep(wait_before)
self.wait_until(lambda: self.in_combat(), time_out=10, raise_if_not_found=True)
# self.sleep(wait_before)
# self.wait_until(lambda: self.in_combat(), time_out=10, raise_if_not_found=True)
self.load_chars()
self.info['Combat Count'] = self.info.get('Combat Count', 0) + 1
while self.in_combat():
Expand Down

0 comments on commit f19df0c

Please sign in to comment.