Skip to content

Commit

Permalink
Fix: CN channel server login
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc committed Aug 27, 2020
1 parent 16b422f commit 1ed8ce8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Binary file modified assets/cn/handler/LOGIN_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion module/handler/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
IN_MAP = Button(area={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702), 'jp': (748, 653, 919, 705)}, color={'cn': (213, 124, 124), 'en': (211, 124, 124), 'jp': (212, 124, 124)}, button={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702), 'jp': (748, 653, 919, 705)}, file={'cn': './assets/cn/handler/IN_MAP.png', 'en': './assets/en/handler/IN_MAP.png', 'jp': './assets/jp/handler/IN_MAP.png'})
IN_STAGE = Button(area={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40), 'jp': (121, 15, 174, 40)}, color={'cn': (149, 167, 207), 'en': (104, 118, 157), 'jp': (151, 167, 205)}, button={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40), 'jp': (121, 15, 174, 40)}, file={'cn': './assets/cn/handler/IN_STAGE.png', 'en': './assets/en/handler/IN_STAGE.png', 'jp': './assets/jp/handler/IN_STAGE.png'})
LOGIN_ANNOUNCE = Button(area={'cn': (1160, 45, 1227, 90), 'en': (1159, 44, 1228, 91), 'jp': (1160, 46, 1224, 86)}, color={'cn': (174, 61, 56), 'en': (193, 79, 73), 'jp': (191, 79, 74)}, button={'cn': (1160, 45, 1227, 90), 'en': (1159, 44, 1228, 91), 'jp': (1160, 46, 1224, 86)}, file={'cn': './assets/cn/handler/LOGIN_ANNOUNCE.png', 'en': './assets/en/handler/LOGIN_ANNOUNCE.png', 'jp': './assets/jp/handler/LOGIN_ANNOUNCE.png'})
LOGIN_CHECK = Button(area={'cn': (77, 655, 154, 711), 'en': (1214, 653, 1268, 709), 'jp': (1214, 653, 1268, 709)}, color={'cn': (33, 36, 33), 'en': (203, 215, 230), 'jp': (203, 215, 230)}, button={'cn': (416, 294, 534, 400), 'en': (1078, 591, 1168, 635), 'jp': (416, 294, 534, 400)}, file={'cn': './assets/cn/handler/LOGIN_CHECK.png', 'en': './assets/en/handler/LOGIN_CHECK.png', 'jp': './assets/jp/handler/LOGIN_CHECK.png'})
LOGIN_CHECK = Button(area={'cn': (1214, 653, 1268, 709), 'en': (1214, 653, 1268, 709), 'jp': (1214, 653, 1268, 709)}, color={'cn': (203, 215, 230), 'en': (203, 215, 230), 'jp': (203, 215, 230)}, button={'cn': (416, 294, 534, 400), 'en': (1078, 591, 1168, 635), 'jp': (416, 294, 534, 400)}, file={'cn': './assets/cn/handler/LOGIN_CHECK.png', 'en': './assets/en/handler/LOGIN_CHECK.png', 'jp': './assets/jp/handler/LOGIN_CHECK.png'})
LOGIN_CONFIRM = Button(area={'cn': (678, 384, 807, 426), 'en': (1214, 653, 1268, 709), 'jp': (1214, 653, 1268, 709)}, color={'cn': (35, 173, 229), 'en': (203, 215, 230), 'jp': (203, 215, 230)}, button={'cn': (678, 384, 807, 426), 'en': (1214, 653, 1268, 709), 'jp': (1214, 653, 1268, 709)}, file={'cn': './assets/cn/handler/LOGIN_CONFIRM.png', 'en': './assets/en/handler/LOGIN_CONFIRM.png', 'jp': './assets/jp/handler/LOGIN_CONFIRM.png'})
LOGIN_GAME_UPDATE = Button(area={'cn': (700, 471, 873, 529), 'en': (699, 470, 874, 530), 'jp': (700, 471, 873, 529)}, color={'cn': (238, 170, 78), 'en': (236, 167, 74), 'jp': (238, 170, 78)}, button={'cn': (700, 471, 873, 529), 'en': (699, 470, 874, 530), 'jp': (700, 471, 873, 529)}, file={'cn': './assets/cn/handler/LOGIN_GAME_UPDATE.png', 'en': './assets/en/handler/LOGIN_GAME_UPDATE.png', 'jp': './assets/jp/handler/LOGIN_GAME_UPDATE.png'})
LOGIN_RETURN_SIGN = Button(area={'cn': (1, 7, 104, 47), 'en': (1, 7, 118, 39), 'jp': (1, 7, 104, 47)}, color={'cn': (158, 214, 229), 'en': (176, 223, 236), 'jp': (158, 214, 229)}, button={'cn': (1, 7, 104, 47), 'en': (1, 7, 118, 39), 'jp': (1, 7, 104, 47)}, file={'cn': './assets/cn/handler/LOGIN_RETURN_SIGN.png', 'en': './assets/en/handler/LOGIN_RETURN_SIGN.png', 'jp': './assets/jp/handler/LOGIN_RETURN_SIGN.png'})
Expand Down
8 changes: 5 additions & 3 deletions module/handler/login.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import datetime

import module.config.server as server
from module.base.timer import Timer
from module.combat.combat import Combat
from module.exception import GameTooManyClickError, ScriptError
Expand Down Expand Up @@ -37,16 +38,17 @@ def _handle_app_login(self):
continue
if self.appear_then_click(LOGIN_RETURN_SIGN, offset=(30, 30), interval=5):
continue
if self.appear_then_click(LOGIN_CONFIRM, interval=5):
continue
if server.server == 'cn':
if self.appear_then_click(LOGIN_CONFIRM, interval=5):
continue
if self.handle_popup_confirm('LOGIN'):
continue
if self.handle_urgent_commission(save_get_items=False):
continue
if self.appear_then_click(GOTO_MAIN, offset=(30, 30), interval=5):
continue

if self.info_bar_count() and self.appear_then_click(LOGIN_CHECK, interval=5):
if self.appear_then_click(LOGIN_CHECK, interval=5):
if not login_success:
logger.info('Login success')
login_success = True
Expand Down

0 comments on commit 1ed8ce8

Please sign in to comment.