private ServerQueueConfigurationUpdateNotification GetServerQueueConfigurationUpdateNotification() { return(new ServerQueueConfigurationUpdateNotification { FreeRotationAdditions = new Dictionary <CharacterType, EvoS.Framework.Network.Static.RequirementCollection>(), GameTypeAvailabilies = GameModeManager.GetGameTypeAvailabilities(), TierInstanceNames = new List <LocalizationPayload>(), AllowBadges = true, NewPlayerPvPQueueDuration = 0 }); }
public static void StartPractice(LobbyServerProtocolBase client) { LobbyGameInfo practiceGameInfo = new LobbyGameInfo { AcceptedPlayers = 1, AcceptTimeout = new TimeSpan(0, 0, 0), ActiveHumanPlayers = 1, ActivePlayers = 1, CreateTimestamp = DateTime.Now.Ticks, GameConfig = new LobbyGameConfig { GameOptionFlags = GameOptionFlag.NoInputIdleDisconnect & GameOptionFlag.NoInputIdleDisconnect, GameServerShutdownTime = -1, GameType = GameType.Practice, InstanceSubTypeBit = 1, IsActive = true, Map = Maps.VR_Practice, ResolveTimeoutLimit = 1600, // TODO ? RoomName = "", Spectators = 0, SubTypes = GameModeManager.GetGameTypeAvailabilities()[GameType.Practice].SubTypes, TeamABots = 0, TeamAPlayers = 1, TeamBBots = 2, TeamBPlayers = 0 } }; LobbyTeamInfo teamInfo = new LobbyTeamInfo(); teamInfo.TeamPlayerInfo = new List <LobbyPlayerInfo> { SessionManager.GetPlayerInfo(client.AccountId), CharacterManager.GetPunchingDummyPlayerInfo(), CharacterManager.GetPunchingDummyPlayerInfo() }; teamInfo.TeamPlayerInfo[0].TeamId = Team.TeamA; teamInfo.TeamPlayerInfo[0].PlayerId = 1; teamInfo.TeamPlayerInfo[1].PlayerId = 2; teamInfo.TeamPlayerInfo[2].PlayerId = 3; string serverAddress = ServerManager.GetServer(practiceGameInfo, teamInfo); if (serverAddress == null) { Log.Print(LogType.Error, "No available server for practice gamemode"); } else { practiceGameInfo.GameServerAddress = "ws://" + serverAddress; practiceGameInfo.GameStatus = GameStatus.Launching; GameAssignmentNotification notification1 = new GameAssignmentNotification { GameInfo = practiceGameInfo, GameResult = GameResult.NoResult, Observer = false, PlayerInfo = teamInfo.TeamPlayerInfo[0], Reconnection = false, GameplayOverrides = client.GetGameplayOverrides() }; client.Send(notification1); practiceGameInfo.GameStatus = GameStatus.Launched; GameInfoNotification notification2 = new GameInfoNotification() { TeamInfo = teamInfo, GameInfo = practiceGameInfo, PlayerInfo = teamInfo.TeamPlayerInfo[0] }; client.Send(notification2); } }