Skip to content

Commit

Permalink
Fix: 修复退役后出现行走超时的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc committed Apr 25, 2020
1 parent 47cec0a commit d43ff8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 2 additions & 5 deletions module/combat/combat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ def combat_appear(self):
if self.config.ENABLE_MAP_FLEET_LOCK and not self.is_in_map():
if self.is_combat_loading():
return True
if self.handle_retirement():
self.map_offensive()
return False
if self.handle_combat_low_emotion():
return False

if self.appear(BATTLE_PREPARATION):
return True
Expand All @@ -57,6 +52,8 @@ def map_offensive(self):

if self.appear_then_click(MAP_OFFENSIVE, interval=1):
continue
if self.handle_combat_low_emotion():
continue

# Break
if self.combat_appear():
Expand Down
6 changes: 6 additions & 0 deletions module/map/fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ def _goto(self, location, expected=''):
result_mystery = mystery

# Combat
if self.config.ENABLE_MAP_FLEET_LOCK and not self.is_in_map():
if self.handle_retirement():
self.map_offensive()
walk_timeout.reset()
if self.handle_combat_low_emotion():
walk_timeout.reset()
if self.combat_appear():
self.combat(expected_end=self._expected_combat_end(expected), fleet_index=self.fleet_current_index)
self.hp_get()
Expand Down

0 comments on commit d43ff8a

Please sign in to comment.