Skip to content

Commit

Permalink
fix: dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
moesnow committed Sep 16, 2023
1 parent 428f3e9 commit 98343c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Binary file modified assets/images/menu/dispatch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/menu/synthesis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions tasks/reward/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ def get_reward():
if not config.dispatch_enable:
logger.info(_("探索派遣未开启"))
return False
screen.change_to('menu')
screen.change_to('dispatch')

if auto.find_element("./assets/images/dispatch/dispatch_reward.png", "image", 0.95):
if auto.find_element("./assets/images/dispatch/reward.png", "image", 0.9, crop=(323 / 1920, 184 / 1080, 814 / 1920, 94 / 1080)):
logger.hr(_("检测到探索派遣奖励"), 2)
screen.change_to('dispatch')

if Dispatch._perform_dispatches():
if config.daily_tasks["派遣1次委托"]:
Expand Down Expand Up @@ -50,6 +49,7 @@ def perform_dispatch_and_check(crop):

@staticmethod
def _click_complete_dispatch(crop):
width, height = auto.get_image_info("./assets/images/dispatch/reward.png")
offset = (-2 * width, 2 * height)
# width, height = auto.get_image_info("./assets/images/dispatch/reward.png")
# offset = (-2 * width, 2 * height)
offset = (-34, 34) # 以后改相对坐标偏移
return auto.click_element("./assets/images/dispatch/reward.png", "image", 0.9, max_retries=10, offset=offset, crop=crop)

0 comments on commit 98343c0

Please sign in to comment.