File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,17 @@ def run(self):
4141 try :
4242 _to_do_task = self .get_task_by_class (AutoDefence )
4343 _to_do_task .config_external_movement (self .walk_to_aim , self .config )
44+ original_info_set = _to_do_task .info_set
45+ _to_do_task .info_set = self .info_set
4446 return _to_do_task .do_run ()
4547 except TaskDisabledException :
4648 pass
4749 except Exception as e :
4850 logger .error ("AutoMyDungeonTask error" , e )
4951 raise
52+ finally :
53+ if _to_do_task is not self :
54+ _to_do_task .info_set = original_info_set
5055
5156 # def do_run(self):
5257 # """执行任务的核心逻辑"""
Original file line number Diff line number Diff line change @@ -33,12 +33,17 @@ def run(self):
3333 try :
3434 _to_do_task = self .get_task_by_class (AutoDefence )
3535 _to_do_task .config_external_movement (self .walk_to_aim , self .config )
36+ original_info_set = _to_do_task .info_set
37+ _to_do_task .info_set = self .info_set
3638 return _to_do_task .do_run ()
3739 except TaskDisabledException :
3840 pass
3941 except Exception as e :
4042 logger .error ('AutoDefence error' , e )
4143 raise
44+ finally :
45+ if _to_do_task is not self :
46+ _to_do_task .info_set = original_info_set
4247
4348 # def do_run(self):
4449 # self.init_param()
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ def run(self):
7171 try :
7272 _to_do_task = self .get_task_by_class (AutoExploration )
7373 _to_do_task .config_external_movement (self .walk_to_aim , self .config )
74+ original_info_set = _to_do_task .info_set
75+ _to_do_task .info_set = self .info_set
7476 while True :
7577 try :
7678 return _to_do_task .do_run ()
@@ -82,6 +84,9 @@ def run(self):
8284 except Exception as e :
8385 logger .error ('AutoDefence error' , e )
8486 raise
87+ finally :
88+ if _to_do_task is not self :
89+ _to_do_task .info_set = original_info_set
8590
8691 def walk_to_aim (self , delay = 0 ):
8792 self .sleep (delay )
You can’t perform that action at this time.
0 commit comments