public static void Logout(this MockedClient client) { Server.TcpHandler.ClientsByConnectionId.Remove(client.ConnectionId); Server.Events.Call(new PlayerQuitEvent() { Player = client.OnlinePlayer }); }
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)); }
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 }); }