public void OnAuthenticationResult(IWorldCoreClient _, INetPacketStream packet) { var authenticationResult = (CoreAuthenticationResultType)(packet.Read <uint>()); switch (authenticationResult) { case CoreAuthenticationResultType.Success: _logger.LogInformation("World Core client authenticated succesfully."); return; case CoreAuthenticationResultType.FailedClusterExists: _logger.LogCritical("Unable to authenticate World Core client. Reason: an other Cluster server (with the same id) is already connected."); break; case CoreAuthenticationResultType.FailedUnknownServer: _logger.LogCritical("Unable to authenticate World Core client. Reason: ISC server doesn't recognize this server. You probably have to update all servers."); break; default: _logger.LogTrace("Core authentification result: {0}", authenticationResult); _logger.LogCritical("Unable to authenticate World Core client. Reason: Cannot recognize Core server. You probably have to update all servers."); break; } if (Core.Common.OperatingSystem.IsWindows()) { Console.ReadLine(); } Environment.Exit((int)authenticationResult); }
public void OnWelcome(IWorldCoreClient client, INetPacketStream _) { _corePacketFactory.SendAuthentication(client, client.WorldServerConfiguration); }
/// <summary> /// Creates a new <see cref="WorldCoreClientService"/> instance. /// </summary> /// <param name="worldCoreClient">World core client.</param> public WorldCoreClientService(IWorldCoreClient worldCoreClient) { _worldCoreClient = worldCoreClient; }