mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-06-06 17:05:54 +00:00
修复自动战斗报错
修复部分机器可能截图空
This commit is contained in:
parent
c1fc7012ac
commit
91abf8312f
@ -33,10 +33,12 @@ config = {
|
|||||||
'windows': { # required when supporting windows game
|
'windows': { # required when supporting windows game
|
||||||
'exe': 'Client-Win64-Shipping.exe',
|
'exe': 'Client-Win64-Shipping.exe',
|
||||||
'calculate_pc_exe_path': calculate_pc_exe_path,
|
'calculate_pc_exe_path': calculate_pc_exe_path,
|
||||||
|
'hwnd_class': 'UnrealWindow',
|
||||||
'interaction': 'PostMessage',
|
'interaction': 'PostMessage',
|
||||||
'can_bit_blt': True, # default false, opengl games does not support bit_blt
|
'can_bit_blt': True, # default false, opengl games does not support bit_blt
|
||||||
'bit_blt_render_full': True,
|
'bit_blt_render_full': True,
|
||||||
'check_hdr_and_night_light': True
|
'check_hdr_and_night_light': True,
|
||||||
|
'require_bg': True
|
||||||
},
|
},
|
||||||
'supported_resolution': {
|
'supported_resolution': {
|
||||||
'ratio': '16:9',
|
'ratio': '16:9',
|
||||||
|
@ -51,6 +51,7 @@ class BaseChar:
|
|||||||
self.logger = get_logger(self.name)
|
self.logger = get_logger(self.name)
|
||||||
self.full_ring_area = 0
|
self.full_ring_area = 0
|
||||||
self.freeze_durations = []
|
self.freeze_durations = []
|
||||||
|
self.last_perform = 0
|
||||||
self._is_forte_full = False
|
self._is_forte_full = False
|
||||||
self.config = {"_full_ring_area": 0, "_ring_color_index": -1}
|
self.config = {"_full_ring_area": 0, "_ring_color_index": -1}
|
||||||
if type(self) is not BaseChar:
|
if type(self) is not BaseChar:
|
||||||
@ -71,6 +72,7 @@ class BaseChar:
|
|||||||
|
|
||||||
def perform(self):
|
def perform(self):
|
||||||
# self.wait_down()
|
# self.wait_down()
|
||||||
|
self.last_perform = time.time()
|
||||||
self.do_perform()
|
self.do_perform()
|
||||||
self.logger.debug(f'set current char false {self.index}')
|
self.logger.debug(f'set current char false {self.index}')
|
||||||
|
|
||||||
|
@ -107,7 +107,6 @@ class BaseCombatTask(BaseWWTask, FindFeature, OCR, CombatCheck):
|
|||||||
current_con = current_char.get_current_con()
|
current_con = current_char.get_current_con()
|
||||||
if current_con == 1:
|
if current_con == 1:
|
||||||
has_intro = True
|
has_intro = True
|
||||||
|
|
||||||
for i, char in enumerate(self.chars):
|
for i, char in enumerate(self.chars):
|
||||||
if char == current_char:
|
if char == current_char:
|
||||||
priority = Priority.CURRENT_CHAR
|
priority = Priority.CURRENT_CHAR
|
||||||
@ -121,8 +120,10 @@ class BaseCombatTask(BaseWWTask, FindFeature, OCR, CombatCheck):
|
|||||||
max_priority = priority
|
max_priority = priority
|
||||||
switch_to = char
|
switch_to = char
|
||||||
if switch_to == current_char:
|
if switch_to == current_char:
|
||||||
# self.check_combat()
|
|
||||||
logger.warning(f"can't find next char to switch to, maybe switching too fast click and wait")
|
logger.warning(f"can't find next char to switch to, maybe switching too fast click and wait")
|
||||||
|
if time.time() - current_char.last_perform < 0.1:
|
||||||
|
current_char.continues_normal_attack(0.1)
|
||||||
|
logger.warning(f"can't find next char to switch to, performing too fast add a normal attack")
|
||||||
return current_char.perform()
|
return current_char.perform()
|
||||||
switch_to.has_intro = has_intro
|
switch_to.has_intro = has_intro
|
||||||
logger.info(f'switch_next_char {current_char} -> {switch_to} has_intro {has_intro}')
|
logger.info(f'switch_next_char {current_char} -> {switch_to} has_intro {has_intro}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user