Skip to content

Commit f3811ee

Browse files
修复了买鱼饵点击位置被固定的bug
1 parent f889124 commit f3811ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

agent/custom/action/auto_buy_fish_bait.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def run(self, context: Context, argv: CustomAction.RunArg) -> CustomAction.RunRe
4949

5050
while True:
5151
img = get_image(controller)
52-
found_bait, _, _, _ = match_template_in_region(img, fish_shop_region, self.bait_template, 0.8)
52+
found_bait, _, x, y = match_template_in_region(img, fish_shop_region, self.bait_template, 0.8)
5353
if found_bait:
5454
for _ in range(3):
55-
click_rect(controller, bait_region)
55+
click_rect(controller, [x, y, bait_region[2], bait_region[3]])
5656
time.sleep(0.1)
5757

5858
img = get_image(controller)

0 commit comments

Comments
 (0)