Skip to content

Commit f36ae75

Browse files
committed
Fix: Switch ui from other DOA events to event_20250424_cn
1 parent 1c6b5eb commit f36ae75

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

4.25 KB
Loading
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
from module.campaign.assets import EVENT_20250424_PT_ICON
12
from module.campaign.campaign_base import CampaignBase as CampaignBase_
2-
from module.ui.page import page_event
3+
from module.logger import logger
4+
from module.ui.page import page_campaign_menu, page_event
35

46

57
class CampaignBase(CampaignBase_):
@@ -8,3 +10,12 @@ def handle_exp_info(self):
810
if self.ui_page_appear(page_event):
911
return False
1012
return super().handle_exp_info()
13+
14+
def ui_goto_event(self):
15+
if self.appear(EVENT_20250424_PT_ICON, offset=(20, 20)) and self.ui_page_appear(page_event):
16+
logger.info('Already at EVENT_20250424')
17+
return True
18+
self.ui_ensure(page_campaign_menu)
19+
if self.is_event_entrance_available():
20+
self.ui_goto(page_event)
21+
return True

module/campaign/assets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
EVENT_20221124_ENTRANCE = Button(area={'cn': (1037, 162, 1077, 195), 'en': (1037, 162, 1077, 195), 'jp': (1037, 162, 1077, 195), 'tw': (1037, 162, 1077, 195)}, color={'cn': (207, 168, 148), 'en': (207, 168, 148), 'jp': (207, 168, 148), 'tw': (207, 168, 148)}, button={'cn': (1037, 162, 1077, 195), 'en': (1037, 162, 1077, 195), 'jp': (1037, 162, 1077, 195), 'tw': (1037, 162, 1077, 195)}, file={'cn': './assets/cn/campaign/EVENT_20221124_ENTRANCE.png', 'en': './assets/cn/campaign/EVENT_20221124_ENTRANCE.png', 'jp': './assets/cn/campaign/EVENT_20221124_ENTRANCE.png', 'tw': './assets/cn/campaign/EVENT_20221124_ENTRANCE.png'})
2020
EVENT_20221124_PT_ICON = Button(area={'cn': (1106, 109, 1135, 130), 'en': (1071, 109, 1101, 129), 'jp': (1106, 109, 1135, 130), 'tw': (1106, 109, 1135, 130)}, color={'cn': (151, 116, 139), 'en': (152, 115, 138), 'jp': (151, 116, 139), 'tw': (151, 116, 139)}, button={'cn': (1106, 109, 1135, 130), 'en': (1071, 109, 1101, 129), 'jp': (1106, 109, 1135, 130), 'tw': (1106, 109, 1135, 130)}, file={'cn': './assets/cn/campaign/EVENT_20221124_PT_ICON.png', 'en': './assets/en/campaign/EVENT_20221124_PT_ICON.png', 'jp': './assets/cn/campaign/EVENT_20221124_PT_ICON.png', 'tw': './assets/cn/campaign/EVENT_20221124_PT_ICON.png'})
2121
EVENT_20230817_STORY = Button(area={'cn': (610, 320, 670, 380), 'en': (610, 320, 670, 380), 'jp': (610, 320, 670, 380), 'tw': (610, 320, 670, 380)}, color={'cn': (183, 180, 190), 'en': (183, 180, 190), 'jp': (183, 180, 190), 'tw': (183, 180, 190)}, button={'cn': (610, 320, 670, 380), 'en': (610, 320, 670, 380), 'jp': (610, 320, 670, 380), 'tw': (610, 320, 670, 380)}, file={'cn': './assets/cn/campaign/EVENT_20230817_STORY.png', 'en': './assets/en/campaign/EVENT_20230817_STORY.png', 'jp': './assets/jp/campaign/EVENT_20230817_STORY.png', 'tw': './assets/tw/campaign/EVENT_20230817_STORY.png'})
22+
EVENT_20250424_PT_ICON = Button(area={'cn': (1109, 109, 1133, 131), 'en': (1109, 109, 1133, 131), 'jp': (1109, 109, 1133, 131), 'tw': (1109, 109, 1133, 131)}, color={'cn': (182, 173, 150), 'en': (182, 173, 150), 'jp': (182, 173, 150), 'tw': (182, 173, 150)}, button={'cn': (1109, 109, 1133, 131), 'en': (1109, 109, 1133, 131), 'jp': (1109, 109, 1133, 131), 'tw': (1109, 109, 1133, 131)}, file={'cn': './assets/cn/campaign/EVENT_20250424_PT_ICON.png', 'en': './assets/cn/campaign/EVENT_20250424_PT_ICON.png', 'jp': './assets/cn/campaign/EVENT_20250424_PT_ICON.png', 'tw': './assets/cn/campaign/EVENT_20250424_PT_ICON.png'})
2223
EVENT_20250724_PT_ICON = Button(area={'cn': (1102, 106, 1139, 121), 'en': (1067, 108, 1104, 123), 'jp': (1102, 106, 1139, 121), 'tw': (1102, 106, 1139, 121)}, color={'cn': (95, 103, 93), 'en': (97, 101, 94), 'jp': (95, 103, 93), 'tw': (95, 103, 93)}, button={'cn': (1102, 106, 1139, 121), 'en': (1067, 108, 1104, 123), 'jp': (1102, 106, 1139, 121), 'tw': (1102, 106, 1139, 121)}, file={'cn': './assets/cn/campaign/EVENT_20250724_PT_ICON.png', 'en': './assets/en/campaign/EVENT_20250724_PT_ICON.png', 'jp': './assets/cn/campaign/EVENT_20250724_PT_ICON.png', 'tw': './assets/cn/campaign/EVENT_20250724_PT_ICON.png'})
2324
EVENT_20260417_DETAIL = Button(area={'cn': (618, 251, 658, 290), 'en': (618, 251, 658, 290), 'jp': (618, 251, 658, 290), 'tw': (618, 251, 658, 290)}, color={'cn': (221, 188, 185), 'en': (221, 188, 185), 'jp': (221, 188, 185), 'tw': (221, 188, 185)}, button={'cn': (618, 251, 658, 290), 'en': (618, 251, 658, 290), 'jp': (618, 251, 658, 290), 'tw': (618, 251, 658, 290)}, file={'cn': './assets/cn/campaign/EVENT_20260417_DETAIL.png', 'en': './assets/cn/campaign/EVENT_20260417_DETAIL.png', 'jp': './assets/cn/campaign/EVENT_20260417_DETAIL.png', 'tw': './assets/cn/campaign/EVENT_20260417_DETAIL.png'})
2425
EVENT_20260417_DETAIL_CHECK = Button(area={'cn': (439, 216, 535, 293), 'en': (439, 216, 535, 293), 'jp': (439, 216, 535, 293), 'tw': (439, 216, 535, 293)}, color={'cn': (187, 160, 173), 'en': (187, 160, 173), 'jp': (187, 160, 173), 'tw': (187, 160, 173)}, button={'cn': (439, 216, 535, 293), 'en': (439, 216, 535, 293), 'jp': (439, 216, 535, 293), 'tw': (439, 216, 535, 293)}, file={'cn': './assets/cn/campaign/EVENT_20260417_DETAIL_CHECK.png', 'en': './assets/cn/campaign/EVENT_20260417_DETAIL_CHECK.png', 'jp': './assets/cn/campaign/EVENT_20260417_DETAIL_CHECK.png', 'tw': './assets/cn/campaign/EVENT_20260417_DETAIL_CHECK.png'})

0 commit comments

Comments
 (0)