コード例 #1
0
 public static void Logout(this MockedClient client)
 {
     Server.TcpHandler.ClientsByConnectionId.Remove(client.ConnectionId);
     Server.Events.Call(new PlayerQuitEvent()
     {
         Player = client.OnlinePlayer
     });
 }
コード例 #2
0
 public static OnlinePlayer FullLoginSequence(this MockedClient client, StoredPlayer player)
 {
     AccountService.RegisterAccount(player.Login, player.Password, player.Email, player);
     client.Login(player.Login, player.Password);
     client.SendToServer(new AssetsReadyPacket()
     {
         UserId = player.UserId
     });
     return(Server.GetPlayer(player.UserId));
 }
コード例 #3
0
 public static void Login(this MockedClient client, string user, string pass)
 {
     // "Connect"
     ServerTcpHandler.ClientsByConnectionId.Add(client.ConnectionId, client);
     client.SendToServer(new LoginPacket()
     {
         Login    = user,
         Password = pass
     });
 }