public LobbyQueue(GameType gameType, LobbyGameConfig gameConfig) { GameType = gameType; SubTypes = gameConfig.SubTypes; Players = new List <LobbyServerConnection>(); QueueInfo = new LobbyMatchmakingQueueInfo() { QueuedPlayers = 0, AverageWaitTime = TimeSpan.FromSeconds(500), GameConfig = gameConfig, PlayersPerMinute = 1, QueueStatus = Framework.Constants.Enums.QueueStatus.Idle, ShowQueueSize = true }; MatchId = 0; }
public void AddPlayer(LobbyServerConnection client) { //Log.Print(LogType.Lobby, $"Player {client.PlayerInfo.GetHandle()} joined {GameType.ToString()} Queue"); Players.Add(client); QueueInfo.QueuedPlayers++; LobbyMatchmakingQueueInfo info = QueueInfo.Clone(); info.QueueStatus = Framework.Constants.Enums.QueueStatus.Success; MatchmakingQueueAssignmentNotification assignmentNotification = new MatchmakingQueueAssignmentNotification() { Reason = "", MatchmakingQueueInfo = info }; _ = client.SendMessage(assignmentNotification); Update(); }
public void SetQueueInfo(LobbyMatchmakingQueueInfo queueInfo) { QueueInfo = queueInfo; }