mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 22:05:12 +00:00
fix(cafe): improve stability of closing reward window
This commit is contained in:
parent
8fe8ed5f86
commit
f669130e33
@ -63,9 +63,10 @@ class Cafe(CafeUI):
|
|||||||
self.click_with_interval(GET_REWARD)
|
self.click_with_interval(GET_REWARD)
|
||||||
case CafeStatus.GOT:
|
case CafeStatus.GOT:
|
||||||
logger.info('Cafe reward have been got')
|
logger.info('Cafe reward have been got')
|
||||||
self.appear_then_click(GET_REWARD_CLOSE)
|
if self.appear(GET_REWARD_CLOSE):
|
||||||
if not self.appear(GET_REWARD_CLOSE):
|
self.click_with_interval(GET_REWARD_CLOSE, 1)
|
||||||
return CafeStatus.INVITATION
|
return status
|
||||||
|
return CafeStatus.INVITATION
|
||||||
case CafeStatus.INVITATION:
|
case CafeStatus.INVITATION:
|
||||||
if handle_invitation(self):
|
if handle_invitation(self):
|
||||||
return CafeStatus.CLICK
|
return CafeStatus.CLICK
|
||||||
@ -77,6 +78,8 @@ class Cafe(CafeUI):
|
|||||||
return CafeStatus.CHECK
|
return CafeStatus.CHECK
|
||||||
self.click_with_interval(buttons[0], interval=1)
|
self.click_with_interval(buttons[0], interval=1)
|
||||||
case CafeStatus.CHECK:
|
case CafeStatus.CHECK:
|
||||||
|
if self.appear_then_click(GET_REWARD_CLOSE):
|
||||||
|
return status
|
||||||
buttons = self.get_clickable_buttons()
|
buttons = self.get_clickable_buttons()
|
||||||
if not self.is_adjust_on:
|
if not self.is_adjust_on:
|
||||||
if not buttons:
|
if not buttons:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user