mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 08:37:42 +00:00
Fix: Handle monthly card popups
This commit is contained in:
parent
1e47a1f621
commit
2fbb3c6d0d
BIN
assets/share/base/popup/MONTHLY_CARD_GET_ITEM.BUTTON.png
Normal file
BIN
assets/share/base/popup/MONTHLY_CARD_GET_ITEM.BUTTON.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
assets/share/base/popup/MONTHLY_CARD_GET_ITEM.png
Normal file
BIN
assets/share/base/popup/MONTHLY_CARD_GET_ITEM.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.0 KiB |
BIN
assets/share/base/popup/MONTHLY_CARD_REWARD.BUTTON.png
Normal file
BIN
assets/share/base/popup/MONTHLY_CARD_REWARD.BUTTON.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
assets/share/base/popup/MONTHLY_CARD_REWARD.png
Normal file
BIN
assets/share/base/popup/MONTHLY_CARD_REWARD.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
@ -23,3 +23,23 @@ GET_REWARD = ButtonWrapper(
|
||||
button=(741, 495, 1071, 644),
|
||||
),
|
||||
)
|
||||
MONTHLY_CARD_GET_ITEM = ButtonWrapper(
|
||||
name='MONTHLY_CARD_GET_ITEM',
|
||||
share=Button(
|
||||
file='./assets/share/base/popup/MONTHLY_CARD_GET_ITEM.png',
|
||||
area=(612, 328, 652, 368),
|
||||
search=(592, 308, 672, 388),
|
||||
color=(209, 187, 179),
|
||||
button=(741, 495, 1071, 644),
|
||||
),
|
||||
)
|
||||
MONTHLY_CARD_REWARD = ButtonWrapper(
|
||||
name='MONTHLY_CARD_REWARD',
|
||||
share=Button(
|
||||
file='./assets/share/base/popup/MONTHLY_CARD_REWARD.png',
|
||||
area=(696, 407, 736, 447),
|
||||
search=(676, 387, 756, 467),
|
||||
color=(137, 107, 91),
|
||||
button=(741, 495, 1071, 644),
|
||||
),
|
||||
)
|
||||
|
@ -30,3 +30,20 @@ class PopupHandler(ModuleBase):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def handle_monthly_card_reward(self, interval=5) -> bool:
|
||||
"""
|
||||
Popup at 04:00 server time if you have purchased the monthly card.
|
||||
|
||||
Args:
|
||||
interval:
|
||||
|
||||
Returns:
|
||||
If handled.
|
||||
"""
|
||||
if self.appear_then_click(MONTHLY_CARD_REWARD, interval=interval):
|
||||
return True
|
||||
if self.appear_then_click(MONTHLY_CARD_GET_ITEM, interval=interval):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -164,6 +164,10 @@ class UI(PopupHandler):
|
||||
return True
|
||||
if self.handle_battle_pass_notification():
|
||||
return True
|
||||
if self.handle_monthly_card_reward():
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def ui_button_interval_reset(self, button):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user