public override void RunImpl() { if (_client.State != LoginClientState.Connected) { _client.Send(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed)); _client.Close(); return; } if (_sessionId == _client.SessionId) { _client.State = LoginClientState.AuthedGG; _client.Send(GGAuth.ToPacket(_client)); } else { _client.Send(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed)); _client.Close(); } }
public override async Task RunImpl() { await Task.Run(() => { if (_client.State != LoginClientState.Connected) { _client.SendAsync(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed)); _client.Close(); return; } if (_sessionId == _client.SessionId) { _client.State = LoginClientState.AuthedGG; _client.SendAsync(GGAuth.ToPacket(_client)); } else { _client.SendAsync(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed)); _client.Close(); } }); }
public override void RunImpl() { _client.Send(GGAuth.ToPacket(_client)); }