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; } } }
public SM_LOGIN_FAIL(AionAuthResponse resp) { _resp = resp; }
public SM_PLAY_FAIL(AionAuthResponse resp) { _resp = resp; }