Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed May 7, 2024
1 parent cfdaca7 commit 4efee94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
'gui_icon': get_path_in_package(__file__, 'icon.ico'),
'ocr': 'RapidOCR',
'about': """
<h1>基于ok-script的白荆回廊自动漫巡辅助</h1>
<p>Github下载和源码地址:</p>
<p><a href="https://github.com/ok-oldking/ok_baijing">https://github.com/ok-oldking/ok_baijing</a></p>
<h1>OK白荆回廊自动漫巡辅助</h1>
<p>QQ群:594495691</p>
""",
'screenshots_folder': "screenshots",
'gui_title': 'OK白荆漫巡', # Optional
Expand Down
10 changes: 5 additions & 5 deletions task/ManXunTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run(self):
while True:
try:
self.loop()
except Finished:
except FinishedException:
self.log_info("自动漫巡任务结束", notify=True)
return
except Exception as e:
Expand Down Expand Up @@ -161,7 +161,7 @@ def do_handle_dialog(self, choice):
self.wait_click_box(lambda: self.ocr(self.box_of_screen(0.5, 0.5, 0.4, 0.3), match="确定完成"))
self.wait_until(lambda: self.ocr(self.box_of_screen(0, 0, 0.2, 0.2)),
pre_action=lambda: self.click_relative(0.5, 0.1), time_out=90)
raise Finished()
raise FinishedException()
elif confirm := find_box_by_name(boxes, "解锁技能和区域"):
self.handle_skill_dialog(boxes, confirm)
elif find_box_by_name(boxes, "获得了一些技能点"):
Expand Down Expand Up @@ -388,11 +388,11 @@ def find_highest_gaowei_number(self, boxes):
box, yellow_line, gray_line = self.locate_gaowei_line(tisheng_boxes[i], avg_width)
if gray_line == 0: # 全点亮或者没有对应卡
if yellow_line > 0: # 全点亮 以黄线数量为优先级
priority = 100 + yellow_line
priority = 100 * yellow_line
else: # 没对应卡 最低优先级
priority = 0
priority = -1
else: # 有灰色线, 以黄线数量为优先级
priority = 10 + yellow_line
priority = 10 * yellow_line
stats_priority = find_index(tisheng_boxes[i].name.replace('提升', ''), self.config.get('属性优先级'))
if stats_priority != -1:
priority += 10 - stats_priority
Expand Down

0 comments on commit 4efee94

Please sign in to comment.