static void Main(string[] args) { ServerHandleNetworkData.InitializeNetworkPackages(); SqlConnection.Initialize(); ServerTCP.SetUp(); QuickPlayLobby.Initialize(); Console.ReadLine(); }
private static void Handle_RequestEnterQuickPlay(int index, byte[] data) { PacketBuffer buffer = new PacketBuffer(); buffer.WriteBytes(data); int packetNum = buffer.ReadInteger(); string msg = buffer.ReadString(); buffer.Dispose(); //Json parse UserSession userSession = SqlConnection.InitialazeUserSession(msg); userSession.mainTeam[0] = SqlConnection.LoadUserChar(userSession.mainTeamNames[0], userSession); userSession.mainTeam[1] = SqlConnection.LoadUserChar(userSession.mainTeamNames[1], userSession); userSession.mainTeam[2] = SqlConnection.LoadUserChar(userSession.mainTeamNames[2], userSession); Console.WriteLine(index + string.Format(" : Entered 'QuickPlay' mode. (Rating = {0}, teamPower = {1})", userSession.rating, userSession.mainTeam[0].power + userSession.mainTeam[1].power + userSession.mainTeam[2].power)); QuickPlayLobby.EnterQuery(userSession); }