add 巡逻模式优先上马
This commit is contained in:
@@ -746,6 +746,24 @@ class WoWMultiKeyGUI(QMainWindow):
|
||||
self.skinning_wait_spin.setSuffix(" 秒")
|
||||
params_right.addRow("剥皮等待时间:", self.skinning_wait_spin)
|
||||
|
||||
self.gs_mount_key = QLineEdit()
|
||||
self.gs_mount_key.setPlaceholderText("如 x")
|
||||
self.gs_mount_key.setMaxLength(16)
|
||||
self.gs_mount_key.setText("x")
|
||||
self.gs_mount_hold = QDoubleSpinBox()
|
||||
self.gs_mount_hold.setRange(0.1, 30.0)
|
||||
self.gs_mount_hold.setSingleStep(0.1)
|
||||
self.gs_mount_hold.setValue(1.6)
|
||||
self.gs_mount_hold.setSuffix(" 秒")
|
||||
self.gs_mount_retry = QDoubleSpinBox()
|
||||
self.gs_mount_retry.setRange(0.0, 60.0)
|
||||
self.gs_mount_retry.setSingleStep(0.1)
|
||||
self.gs_mount_retry.setValue(2.0)
|
||||
self.gs_mount_retry.setSuffix(" 秒")
|
||||
params_right.addRow("上马按键 (mount_key):", self.gs_mount_key)
|
||||
params_right.addRow("上马按住时长 (mount_hold_sec):", self.gs_mount_hold)
|
||||
params_right.addRow("上马重试间隔 (mount_retry_after_sec):", self.gs_mount_retry)
|
||||
|
||||
params_row.addLayout(params_left)
|
||||
params_row.addLayout(params_right)
|
||||
params_layout.addWidget(params_content)
|
||||
@@ -780,6 +798,9 @@ class WoWMultiKeyGUI(QMainWindow):
|
||||
self.gs_scan_height.setValue(cfg.get('scan_region_height', 15))
|
||||
self.gs_offset_left.setValue(cfg.get('offset_left', 20))
|
||||
self.gs_offset_top.setValue(cfg.get('offset_top', 45))
|
||||
self.gs_mount_key.setText(str(cfg.get('mount_key', 'x') or 'x'))
|
||||
self.gs_mount_hold.setValue(float(cfg.get('mount_hold_sec', 1.6)))
|
||||
self.gs_mount_retry.setValue(float(cfg.get('mount_retry_after_sec', 2.0)))
|
||||
except Exception as e:
|
||||
self.log(f"加载参数配置失败: {e}")
|
||||
try:
|
||||
@@ -800,6 +821,9 @@ class WoWMultiKeyGUI(QMainWindow):
|
||||
cfg['scan_region_height'] = self.gs_scan_height.value()
|
||||
cfg['offset_left'] = self.gs_offset_left.value()
|
||||
cfg['offset_top'] = self.gs_offset_top.value()
|
||||
cfg['mount_key'] = (self.gs_mount_key.text().strip() or 'x')
|
||||
cfg['mount_hold_sec'] = float(self.gs_mount_hold.value())
|
||||
cfg['mount_retry_after_sec'] = float(self.gs_mount_retry.value())
|
||||
path = save_layout_config(cfg)
|
||||
# bot 参数写入主配置文件
|
||||
self.config = self.config or {}
|
||||
|
||||
Reference in New Issue
Block a user