Package l2p.loginserver

Examples of l2p.loginserver.LoginController


    _password = new String(decrypted, 0x6C, 16).trim();
    _ncotp = decrypted[0x7c];
    _ncotp |= decrypted[0x7d] << 8;
    _ncotp |= decrypted[0x7e] << 16;
    _ncotp |= decrypted[0x7f] << 24;
    LoginController lc = LoginController.getInstance();
    Status status = lc.tryAuthLogin(_user, _password, client);
    if(status.state == State.IN_USE)
    {
      L2LoginClient oldClient = lc.getAuthedClient(_user);
      // кикаем другого клиента, подключенного к логину
      if(oldClient != null)
      {
        oldClient.close(LoginFailReason.REASON_ACCOUNT_IN_USE);
      }
      if(lc.isAccountInLoginServer(_user))
      {
        lc.removeAuthedLoginClient(_user).close(LoginFailReason.REASON_ACCOUNT_IN_USE);
      }
      status.state = State.VALID;
    }
    if(status.state == State.VALID)
    {
      client.setAccount(_user);
      client.setState(LoginClientState.AUTHED_LOGIN);
      client.setSessionKey(lc.assignSessionKeyToClient());
      lc.addAuthedLoginClient(_user, client);
      client.setBonus(status.bonus, status.bonus_expire);
      client.sendPacket(new LoginOk(client.getSessionKey()));
    }
    else if(status.state == State.WRONG)
    {
View Full Code Here

TOP

Related Classes of l2p.loginserver.LoginController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.