Esempio n. 1
0
        protected override void runImpl()
        {
            if (!Information.IsNothing(data))
            {
                byte[] array = null;
                try
                {
                    array = base.Client.RsaDecrypt(data);
                }
                catch (Exception projectError)
                {
                    ProjectData.SetProjectError(projectError);
                    SendPacket(new SM_LOGIN_FAIL(AionAuthResponse.SYSTEM_ERROR));
                    ProjectData.ClearProjectError();
                    return;
                }
                string           userName         = Encoding.UTF8.GetString(array, 64, 32).Replace("\0", "");
                string           password         = Encoding.UTF8.GetString(array, 96, 32).Replace("\0", "");
                AionAuthResponse aionAuthResponse = AccountController.Login(userName, password, base.Client);
                switch (aionAuthResponse)
                {
                case AionAuthResponse.AUTHED:
                    base.Client.State      = State.AUTHED_LOGIN;
                    base.Client.SessionKey = new SessionKey(base.Client.Account);
                    SendPacket(new SM_LOGIN_OK(base.Client.SessionKey));
                    break;

                case AionAuthResponse.BAN_ACCOUNT:
                    SendPacket(new SM_LOGIN_BAN(1));
                    break;

                default:
                    SendPacket(new SM_LOGIN_FAIL(aionAuthResponse));
                    break;
                }
            }
        }
Esempio n. 2
0
 public SM_LOGIN_FAIL(AionAuthResponse resp)
 {
     _resp = resp;
 }
Esempio n. 3
0
 public SM_PLAY_FAIL(AionAuthResponse resp)
 {
     _resp = resp;
 }