Refine combat approach timing and always run mouse loot
This commit is contained in:
35
auto_bot.py
35
auto_bot.py
@@ -207,6 +207,7 @@ class AutoBot:
|
|||||||
enable_mouse_loot=True,
|
enable_mouse_loot=True,
|
||||||
turn_error_key=None,
|
turn_error_key=None,
|
||||||
turn_error_hold_sec=None,
|
turn_error_hold_sec=None,
|
||||||
|
distance_interact_pause_sec=None,
|
||||||
):
|
):
|
||||||
self.last_tab_time = 0
|
self.last_tab_time = 0
|
||||||
self.last_interaction_time = 0
|
self.last_interaction_time = 0
|
||||||
@@ -226,6 +227,12 @@ class AutoBot:
|
|||||||
self.turn_error_key = (turn_error_key or 's').strip().lower() or 's'
|
self.turn_error_key = (turn_error_key or 's').strip().lower() or 's'
|
||||||
self.combat_signal_retry_sec = 1.0
|
self.combat_signal_retry_sec = 1.0
|
||||||
self.turn_error_hold_sec = float(turn_error_hold_sec) if turn_error_hold_sec is not None else 0.8
|
self.turn_error_hold_sec = float(turn_error_hold_sec) if turn_error_hold_sec is not None else 0.8
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_sec = (
|
||||||
|
float(distance_interact_pause_sec) if distance_interact_pause_sec is not None else 1.0
|
||||||
|
)
|
||||||
|
self.distance_interact_brake_sec = 0.08
|
||||||
self._last_mouse_path_scale_signature = None
|
self._last_mouse_path_scale_signature = None
|
||||||
|
|
||||||
def execute_disengage_loot(self):
|
def execute_disengage_loot(self):
|
||||||
@@ -307,8 +314,6 @@ class AutoBot:
|
|||||||
score_threshold=0.7,
|
score_threshold=0.7,
|
||||||
return_on_first_click=False,
|
return_on_first_click=False,
|
||||||
):
|
):
|
||||||
if random.random() < 0.1:
|
|
||||||
return False
|
|
||||||
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
||||||
if not hwnd:
|
if not hwnd:
|
||||||
return False
|
return False
|
||||||
@@ -397,7 +402,6 @@ class AutoBot:
|
|||||||
score_threshold=0.7,
|
score_threshold=0.7,
|
||||||
return_on_first_click=False,
|
return_on_first_click=False,
|
||||||
)
|
)
|
||||||
if random.random() < 0.1: return False
|
|
||||||
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
||||||
if not hwnd: return False
|
if not hwnd: return False
|
||||||
|
|
||||||
@@ -514,6 +518,8 @@ class AutoBot:
|
|||||||
is_new_target = (target_hp > self.last_target_hp + 5)
|
is_new_target = (target_hp > self.last_target_hp + 5)
|
||||||
if is_new_target:
|
if is_new_target:
|
||||||
self._has_braked_for_target = False
|
self._has_braked_for_target = False
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
|
|
||||||
# 1. 刹车逻辑
|
# 1. 刹车逻辑
|
||||||
if not self._has_braked_for_target and 0 < target_hp < self.last_target_hp:
|
if not self._has_braked_for_target and 0 < target_hp < self.last_target_hp:
|
||||||
@@ -522,6 +528,20 @@ class AutoBot:
|
|||||||
hw_ctrl.keyUp('s')
|
hw_ctrl.keyUp('s')
|
||||||
self._has_braked_for_target = True
|
self._has_braked_for_target = True
|
||||||
|
|
||||||
|
if self.distance_interact_brake_pending:
|
||||||
|
if current_time < self.distance_interact_pause_until:
|
||||||
|
self.last_target_hp = target_hp
|
||||||
|
self._was_in_combat_or_target = True
|
||||||
|
return
|
||||||
|
hw_ctrl.keyDown('s')
|
||||||
|
time.sleep(self.distance_interact_brake_sec)
|
||||||
|
hw_ctrl.keyUp('s')
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
|
self.last_target_hp = target_hp
|
||||||
|
self._was_in_combat_or_target = True
|
||||||
|
return
|
||||||
|
|
||||||
# 2. 根据战斗信号执行纠偏动作
|
# 2. 根据战斗信号执行纠偏动作
|
||||||
if (
|
if (
|
||||||
combat_error_signal == 100
|
combat_error_signal == 100
|
||||||
@@ -529,6 +549,11 @@ class AutoBot:
|
|||||||
):
|
):
|
||||||
hw_ctrl.press(KEY_LOOT)
|
hw_ctrl.press(KEY_LOOT)
|
||||||
self.last_interaction_time = current_time
|
self.last_interaction_time = current_time
|
||||||
|
self.distance_interact_pause_until = current_time + self.distance_interact_pause_sec
|
||||||
|
self.distance_interact_brake_pending = True
|
||||||
|
self.last_target_hp = target_hp
|
||||||
|
self._was_in_combat_or_target = True
|
||||||
|
return
|
||||||
|
|
||||||
if (
|
if (
|
||||||
combat_error_signal == 50
|
combat_error_signal == 50
|
||||||
@@ -552,6 +577,8 @@ class AutoBot:
|
|||||||
self.last_target_hp = 0
|
self.last_target_hp = 0
|
||||||
self.last_turn_signal_time = 0.0
|
self.last_turn_signal_time = 0.0
|
||||||
self.last_interaction_time = 0.0
|
self.last_interaction_time = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
self._has_braked_for_target = False
|
self._has_braked_for_target = False
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -559,6 +586,8 @@ class AutoBot:
|
|||||||
self.last_target_hp = 0
|
self.last_target_hp = 0
|
||||||
self.last_turn_signal_time = 0.0
|
self.last_turn_signal_time = 0.0
|
||||||
self.last_interaction_time = 0.0
|
self.last_interaction_time = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
self._has_braked_for_target = False
|
self._has_braked_for_target = False
|
||||||
|
|
||||||
self.tab_no_target_count = min(self.tab_no_target_count, 5)
|
self.tab_no_target_count = min(self.tab_no_target_count, 5)
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ class AutoBotMove:
|
|||||||
enable_mouse_loot=True,
|
enable_mouse_loot=True,
|
||||||
turn_error_key=None,
|
turn_error_key=None,
|
||||||
turn_error_hold_sec=None,
|
turn_error_hold_sec=None,
|
||||||
|
distance_interact_pause_sec=None,
|
||||||
):
|
):
|
||||||
self.last_tab_time = 0
|
self.last_tab_time = 0
|
||||||
self.last_interaction_time = 0 # 记录上一次按互动键的时间
|
self.last_interaction_time = 0 # 记录上一次按互动键的时间
|
||||||
@@ -275,6 +276,12 @@ class AutoBotMove:
|
|||||||
self.combat_signal_retry_sec = 1.0
|
self.combat_signal_retry_sec = 1.0
|
||||||
self.turn_error_key = (turn_error_key or 's').strip().lower() or 's'
|
self.turn_error_key = (turn_error_key or 's').strip().lower() or 's'
|
||||||
self.turn_error_hold_sec = float(turn_error_hold_sec) if turn_error_hold_sec is not None else 0.8
|
self.turn_error_hold_sec = float(turn_error_hold_sec) if turn_error_hold_sec is not None else 0.8
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_sec = (
|
||||||
|
float(distance_interact_pause_sec) if distance_interact_pause_sec is not None else 1.0
|
||||||
|
)
|
||||||
|
self.distance_interact_brake_sec = 0.08
|
||||||
self._last_mouse_path_scale_signature = None
|
self._last_mouse_path_scale_signature = None
|
||||||
# stop_check: 返回 True 表示需要立即停止(用于中断阻塞中的后勤/路线导航)
|
# stop_check: 返回 True 表示需要立即停止(用于中断阻塞中的后勤/路线导航)
|
||||||
self._stop_check = stop_check if callable(stop_check) else (lambda: False)
|
self._stop_check = stop_check if callable(stop_check) else (lambda: False)
|
||||||
@@ -404,8 +411,6 @@ class AutoBotMove:
|
|||||||
score_threshold=0.7,
|
score_threshold=0.7,
|
||||||
return_on_first_click=False,
|
return_on_first_click=False,
|
||||||
):
|
):
|
||||||
if random.random() < 0.1:
|
|
||||||
return False
|
|
||||||
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
||||||
if not hwnd:
|
if not hwnd:
|
||||||
return False
|
return False
|
||||||
@@ -499,7 +504,6 @@ class AutoBotMove:
|
|||||||
score_threshold=0.7,
|
score_threshold=0.7,
|
||||||
return_on_first_click=False,
|
return_on_first_click=False,
|
||||||
)
|
)
|
||||||
if random.random() < 0.1: return False
|
|
||||||
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
hwnd = win32gui.FindWindow(None, WIN_TITLE)
|
||||||
if not hwnd: return False
|
if not hwnd: return False
|
||||||
|
|
||||||
@@ -692,6 +696,8 @@ class AutoBotMove:
|
|||||||
is_new_target = (target_hp > self.last_target_hp + 5)
|
is_new_target = (target_hp > self.last_target_hp + 5)
|
||||||
if is_new_target:
|
if is_new_target:
|
||||||
self._has_braked_for_target = False
|
self._has_braked_for_target = False
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
|
|
||||||
# 1. 掉血刹车逻辑:第一次发现目标掉血且正在移动,按一下 S 停住
|
# 1. 掉血刹车逻辑:第一次发现目标掉血且正在移动,按一下 S 停住
|
||||||
if not self._has_braked_for_target and 0 < target_hp < self.last_target_hp:
|
if not self._has_braked_for_target and 0 < target_hp < self.last_target_hp:
|
||||||
@@ -700,6 +706,20 @@ class AutoBotMove:
|
|||||||
hw_ctrl.keyUp('s')
|
hw_ctrl.keyUp('s')
|
||||||
self._has_braked_for_target = True
|
self._has_braked_for_target = True
|
||||||
|
|
||||||
|
if self.distance_interact_brake_pending:
|
||||||
|
if now < self.distance_interact_pause_until:
|
||||||
|
self.last_target_hp = target_hp
|
||||||
|
self._was_in_combat_or_target = True
|
||||||
|
return
|
||||||
|
hw_ctrl.keyDown('s')
|
||||||
|
time.sleep(self.distance_interact_brake_sec)
|
||||||
|
hw_ctrl.keyUp('s')
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
|
self.last_target_hp = target_hp
|
||||||
|
self._was_in_combat_or_target = True
|
||||||
|
return
|
||||||
|
|
||||||
# 根据战斗信号执行纠偏动作
|
# 根据战斗信号执行纠偏动作
|
||||||
if (
|
if (
|
||||||
combat_error_signal == 100
|
combat_error_signal == 100
|
||||||
@@ -707,6 +727,11 @@ class AutoBotMove:
|
|||||||
):
|
):
|
||||||
hw_ctrl.press(KEY_LOOT)
|
hw_ctrl.press(KEY_LOOT)
|
||||||
self.last_interaction_time = now
|
self.last_interaction_time = now
|
||||||
|
self.distance_interact_pause_until = now + self.distance_interact_pause_sec
|
||||||
|
self.distance_interact_brake_pending = True
|
||||||
|
self.last_target_hp = target_hp
|
||||||
|
self._was_in_combat_or_target = True
|
||||||
|
return
|
||||||
|
|
||||||
if (
|
if (
|
||||||
combat_error_signal == 50
|
combat_error_signal == 50
|
||||||
@@ -725,6 +750,8 @@ class AutoBotMove:
|
|||||||
self.last_target_hp = 0
|
self.last_target_hp = 0
|
||||||
self.last_turn_signal_time = 0.0
|
self.last_turn_signal_time = 0.0
|
||||||
self.last_interaction_time = 0.0
|
self.last_interaction_time = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
self._has_braked_for_target = False
|
self._has_braked_for_target = False
|
||||||
if state['combat']:
|
if state['combat']:
|
||||||
hw_ctrl.press(KEY_TAB)
|
hw_ctrl.press(KEY_TAB)
|
||||||
@@ -743,12 +770,16 @@ class AutoBotMove:
|
|||||||
self.target_acquired_time = None
|
self.target_acquired_time = None
|
||||||
self.last_turn_signal_time = 0.0
|
self.last_turn_signal_time = 0.0
|
||||||
self.last_interaction_time = 0.0
|
self.last_interaction_time = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
self.last_tab_time = time.time() + 1.0 # 给找怪增加 1 秒额外冷却
|
self.last_tab_time = time.time() + 1.0 # 给找怪增加 1 秒额外冷却
|
||||||
return
|
return
|
||||||
|
|
||||||
self.target_acquired_time = None
|
self.target_acquired_time = None
|
||||||
self.last_turn_signal_time = 0.0
|
self.last_turn_signal_time = 0.0
|
||||||
self.last_interaction_time = 0.0
|
self.last_interaction_time = 0.0
|
||||||
|
self.distance_interact_brake_pending = False
|
||||||
|
self.distance_interact_pause_until = 0.0
|
||||||
self._was_in_combat_or_target = False
|
self._was_in_combat_or_target = False
|
||||||
|
|
||||||
# 4. 脱战低血量:就地吃面包(最多等待 30 秒或回满)
|
# 4. 脱战低血量:就地吃面包(最多等待 30 秒或回满)
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ class GameLoopWorker(QThread):
|
|||||||
use_hardware_input=True,
|
use_hardware_input=True,
|
||||||
turn_error_key=None,
|
turn_error_key=None,
|
||||||
turn_error_hold_sec=None,
|
turn_error_hold_sec=None,
|
||||||
|
distance_interact_pause_sec=None,
|
||||||
):
|
):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.mode = mode # 'monitor' | 'patrol' | 'combat' | 'quest_follow' | 'flight' | 'record'
|
self.mode = mode # 'monitor' | 'patrol' | 'combat' | 'quest_follow' | 'flight' | 'record'
|
||||||
@@ -371,6 +372,10 @@ class GameLoopWorker(QThread):
|
|||||||
self.turn_error_hold_sec = float(turn_error_hold_sec)
|
self.turn_error_hold_sec = float(turn_error_hold_sec)
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
self.turn_error_hold_sec = 0.8
|
self.turn_error_hold_sec = 0.8
|
||||||
|
try:
|
||||||
|
self.distance_interact_pause_sec = float(distance_interact_pause_sec)
|
||||||
|
except (TypeError, ValueError):
|
||||||
|
self.distance_interact_pause_sec = 1.0
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
@@ -407,6 +412,7 @@ class GameLoopWorker(QThread):
|
|||||||
enable_mouse_loot=self.enable_mouse_loot,
|
enable_mouse_loot=self.enable_mouse_loot,
|
||||||
turn_error_key=self.turn_error_key,
|
turn_error_key=self.turn_error_key,
|
||||||
turn_error_hold_sec=self.turn_error_hold_sec,
|
turn_error_hold_sec=self.turn_error_hold_sec,
|
||||||
|
distance_interact_pause_sec=self.distance_interact_pause_sec,
|
||||||
)
|
)
|
||||||
self.bot_move._on_hearthstone_stop = self.stop_signal.emit
|
self.bot_move._on_hearthstone_stop = self.stop_signal.emit
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
@@ -422,6 +428,7 @@ class GameLoopWorker(QThread):
|
|||||||
enable_mouse_loot=self.enable_mouse_loot,
|
enable_mouse_loot=self.enable_mouse_loot,
|
||||||
turn_error_key=self.turn_error_key,
|
turn_error_key=self.turn_error_key,
|
||||||
turn_error_hold_sec=self.turn_error_hold_sec,
|
turn_error_hold_sec=self.turn_error_hold_sec,
|
||||||
|
distance_interact_pause_sec=self.distance_interact_pause_sec,
|
||||||
)
|
)
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
self.log_signal.emit(f"❌ 自动打怪依赖加载失败: {e}")
|
self.log_signal.emit(f"❌ 自动打怪依赖加载失败: {e}")
|
||||||
@@ -1076,6 +1083,11 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
self.turn_error_hold_spin.setSingleStep(0.1)
|
self.turn_error_hold_spin.setSingleStep(0.1)
|
||||||
self.turn_error_hold_spin.setValue(0.8)
|
self.turn_error_hold_spin.setValue(0.8)
|
||||||
self.turn_error_hold_spin.setSuffix(" 秒")
|
self.turn_error_hold_spin.setSuffix(" 秒")
|
||||||
|
self.distance_interact_pause_spin = QDoubleSpinBox()
|
||||||
|
self.distance_interact_pause_spin.setRange(0.1, 10.0)
|
||||||
|
self.distance_interact_pause_spin.setSingleStep(0.1)
|
||||||
|
self.distance_interact_pause_spin.setValue(1.0)
|
||||||
|
self.distance_interact_pause_spin.setSuffix(" 秒")
|
||||||
self.gs_hearthstone_key = QLineEdit()
|
self.gs_hearthstone_key = QLineEdit()
|
||||||
self.gs_hearthstone_key.setPlaceholderText("如 b")
|
self.gs_hearthstone_key.setPlaceholderText("如 b")
|
||||||
self.gs_hearthstone_key.setMaxLength(16)
|
self.gs_hearthstone_key.setMaxLength(16)
|
||||||
@@ -1141,11 +1153,13 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
game_grid.addWidget(self.turn_error_key_edit, 5, 1)
|
game_grid.addWidget(self.turn_error_key_edit, 5, 1)
|
||||||
game_grid.addWidget(QLabel("需转身按住时长:"), 6, 0)
|
game_grid.addWidget(QLabel("需转身按住时长:"), 6, 0)
|
||||||
game_grid.addWidget(self.turn_error_hold_spin, 6, 1)
|
game_grid.addWidget(self.turn_error_hold_spin, 6, 1)
|
||||||
|
game_grid.addWidget(QLabel("距离远暂停技能时长:"), 7, 0)
|
||||||
|
game_grid.addWidget(self.distance_interact_pause_spin, 7, 1)
|
||||||
|
|
||||||
game_grid.addWidget(self.gs_use_hardware_input, 7, 0, 1, 2)
|
game_grid.addWidget(self.gs_use_hardware_input, 8, 0, 1, 2)
|
||||||
game_grid.addWidget(QLabel("复活按键:"), 6, 2)
|
game_grid.addWidget(QLabel("复活按键:"), 6, 2)
|
||||||
game_grid.addWidget(self.gs_resurrect_key, 6, 3)
|
game_grid.addWidget(self.gs_resurrect_key, 6, 3)
|
||||||
game_grid.addWidget(self.gs_bag_full_hearthstone, 8, 1)
|
game_grid.addWidget(self.gs_bag_full_hearthstone, 9, 1)
|
||||||
|
|
||||||
params_layout.addWidget(game_group)
|
params_layout.addWidget(game_group)
|
||||||
|
|
||||||
@@ -1199,6 +1213,7 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
self.eat_max_wait_spin.setValue(float(bot_cfg.get('eat_max_wait_sec', 30.0)))
|
self.eat_max_wait_spin.setValue(float(bot_cfg.get('eat_max_wait_sec', 30.0)))
|
||||||
self.turn_error_key_edit.setText(str(bot_cfg.get('turn_error_key', 's')).strip() or 's')
|
self.turn_error_key_edit.setText(str(bot_cfg.get('turn_error_key', 's')).strip() or 's')
|
||||||
self.turn_error_hold_spin.setValue(float(bot_cfg.get('turn_error_hold_sec', 0.8)))
|
self.turn_error_hold_spin.setValue(float(bot_cfg.get('turn_error_hold_sec', 0.8)))
|
||||||
|
self.distance_interact_pause_spin.setValue(float(bot_cfg.get('distance_interact_pause_sec', 1.0)))
|
||||||
self.gs_enable_mouse_loot.setChecked(bool(bot_cfg.get('enable_mouse_loot', True)))
|
self.gs_enable_mouse_loot.setChecked(bool(bot_cfg.get('enable_mouse_loot', True)))
|
||||||
self.gs_use_hardware_input.setChecked(bool(bot_cfg.get('use_hardware_input', True)))
|
self.gs_use_hardware_input.setChecked(bool(bot_cfg.get('use_hardware_input', True)))
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -1208,6 +1223,7 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
self.eat_max_wait_spin.setValue(30.0)
|
self.eat_max_wait_spin.setValue(30.0)
|
||||||
self.turn_error_key_edit.setText('s')
|
self.turn_error_key_edit.setText('s')
|
||||||
self.turn_error_hold_spin.setValue(0.8)
|
self.turn_error_hold_spin.setValue(0.8)
|
||||||
|
self.distance_interact_pause_spin.setValue(1.0)
|
||||||
self.gs_enable_mouse_loot.setChecked(True)
|
self.gs_enable_mouse_loot.setChecked(True)
|
||||||
self.gs_use_hardware_input.setChecked(True)
|
self.gs_use_hardware_input.setChecked(True)
|
||||||
|
|
||||||
@@ -1239,6 +1255,7 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
self.config['bot']['eat_max_wait_sec'] = float(self.eat_max_wait_spin.value())
|
self.config['bot']['eat_max_wait_sec'] = float(self.eat_max_wait_spin.value())
|
||||||
self.config['bot']['turn_error_key'] = self.turn_error_key_edit.text().strip() or 's'
|
self.config['bot']['turn_error_key'] = self.turn_error_key_edit.text().strip() or 's'
|
||||||
self.config['bot']['turn_error_hold_sec'] = float(self.turn_error_hold_spin.value())
|
self.config['bot']['turn_error_hold_sec'] = float(self.turn_error_hold_spin.value())
|
||||||
|
self.config['bot']['distance_interact_pause_sec'] = float(self.distance_interact_pause_spin.value())
|
||||||
self.config['bot']['enable_mouse_loot'] = self.gs_enable_mouse_loot.isChecked()
|
self.config['bot']['enable_mouse_loot'] = self.gs_enable_mouse_loot.isChecked()
|
||||||
self.config['bot']['use_hardware_input'] = self.gs_use_hardware_input.isChecked()
|
self.config['bot']['use_hardware_input'] = self.gs_use_hardware_input.isChecked()
|
||||||
self._save_main_config()
|
self._save_main_config()
|
||||||
@@ -1681,6 +1698,7 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
eat_max_wait_sec = 30.0
|
eat_max_wait_sec = 30.0
|
||||||
turn_error_key = self.turn_error_key_edit.text().strip() or 's'
|
turn_error_key = self.turn_error_key_edit.text().strip() or 's'
|
||||||
turn_error_hold_sec = float(self.turn_error_hold_spin.value())
|
turn_error_hold_sec = float(self.turn_error_hold_spin.value())
|
||||||
|
distance_interact_pause_sec = float(self.distance_interact_pause_spin.value())
|
||||||
|
|
||||||
# 从 layout_config 读取死亡/复活按键
|
# 从 layout_config 读取死亡/复活按键
|
||||||
try:
|
try:
|
||||||
@@ -1717,6 +1735,7 @@ class WoWMultiKeyGUI(QMainWindow):
|
|||||||
use_hardware_input=use_hardware_input,
|
use_hardware_input=use_hardware_input,
|
||||||
turn_error_key=turn_error_key,
|
turn_error_key=turn_error_key,
|
||||||
turn_error_hold_sec=turn_error_hold_sec,
|
turn_error_hold_sec=turn_error_hold_sec,
|
||||||
|
distance_interact_pause_sec=distance_interact_pause_sec,
|
||||||
)
|
)
|
||||||
self.game_worker.state_signal.connect(self.state_label.setText)
|
self.game_worker.state_signal.connect(self.state_label.setText)
|
||||||
self.game_worker.log_signal.connect(self.log)
|
self.game_worker.log_signal.connect(self.log)
|
||||||
|
|||||||
Reference in New Issue
Block a user