Skip to content

Commit

Permalink
Merge pull request #732 from guch8017/main
Browse files Browse the repository at this point in the history
Fix: 修正当大月卡按钮不存在时无法正确识别已进入地图的问题
  • Loading branch information
Night-stars-1 authored Oct 10, 2023
2 parents 72e2725 + fb31493 commit 7ab2328
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/calculated.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def fighting(self):
time.sleep(0.1)
if self.has_red((4, 7, 10, 19)):
while True:
result = self.get_pix_rgb(pos=(1337, 62))
result = self.get_pix_rgb(pos=(40, 62))
log.debug(f"进入战斗取色: {result}")
if self.compare_lists([0, 0, 222], result) and self.compare_lists(result, [0, 0, 255]):
self.click()
Expand All @@ -412,7 +412,7 @@ def fighting(self):
self.wait_fight_end()
return True
time.sleep(0.2)
result = self.get_pix_rgb(pos=(1337, 62))
result = self.get_pix_rgb(pos=(40, 62))
log.debug(f"进入战斗取色: {result}")
if not (self.compare_lists([0, 0, 225], result) and self.compare_lists(result, [0, 0, 255])):
self.wait_fight_end() # 无论是否识别到敌人都判断是否结束战斗,反正怪物袭击
Expand Down Expand Up @@ -761,7 +761,7 @@ def wait_join(self):
return endtime
'''
endtime = time.time() - start_time
result = self.get_pix_rgb(pos=(1337, 62))
result = self.get_pix_rgb(pos=(40, 62))
log.debug(result)
if self.compare_lists([0, 0, 222], result):
log.info(_("已进入地图"))
Expand Down

0 comments on commit 7ab2328

Please sign in to comment.