public DefaultLobbyPage(QueueLobby lobby) { InitializeComponent(); this.lobby = lobby; lobby.MemberJoined += Lobby_MemberJoined; lobby.MemberLeft += Lobby_MemberLeft; lobby.QueueEntered += Lobby_QueueEntered; lobby.QueueLeft += Lobby_QueueLeft; lobby.LeftLobby += Lobby_LeftLobby; lobby.Loaded += Lobby_Loaded; lobby.CatchUp(); config = Session.Current.AvailableQueues[lobby.QueueID]; var map = GameMap.Maps.FirstOrDefault(m => config.SupportedMapIds.Contains(m.MapId)); MapImage.Source = new BitmapImage(GameMap.Images[map]); MapLabel.Content = map.DisplayName; QueueLabel.Content = GameConfig.Values[config.GameTypeConfigId].Value; ModeLabel.Content = config.Ranked ? "Ranked" : ModeLabel.Content = GameMode.Values[config.GameMode].Value; TeamSizeLabel.Content = $"{config.NumPlayersPerTeam}v{config.NumPlayersPerTeam}"; }
public static QueueLobby Join(Invitation invite, int queueId) { var lobby = new QueueLobby(queueId); Session.Current.CurrentLobby = lobby; var task = invite.Join(); task.ContinueWith(t => lobby.GotLobbyStatus(t.Result)); return lobby; }
public static QueueLobby CreateLobby(int queueId) { var lobby = new QueueLobby(queueId); Session.Current.CurrentLobby = lobby; var task = RiotServices.GameInvitationService.CreateArrangedTeamLobby(queueId); task.ContinueWith(t => lobby.GotLobbyStatus(t.Result)); return lobby; }
public static QueueLobby Join(Invitation invite, int queueId) { var lobby = new QueueLobby(queueId); Session.Current.CurrentLobby = lobby; var task = invite.Join(); task.ContinueWith(t => lobby.GotLobbyStatus(t.Result)); return(lobby); }
public static QueueLobby CreateLobby(int queueId) { var lobby = new QueueLobby(queueId); Session.Current.CurrentLobby = lobby; var task = RiotServices.GameInvitationService.CreateArrangedTeamLobby(queueId); task.ContinueWith(t => lobby.GotLobbyStatus(t.Result)); return(lobby); }
public Lobby Accept() { var metadata = JSONParser.ParseObject(invite.GameMetaData); if ((int)metadata["gameTypeConfigId"] == GameConfig.CapDraft.Key) { return(TBDLobby.Join(this, (int)metadata["queueId"])); } else { switch ((string)metadata["gameType"]) { case "PRACTICE_GAME": return(CustomLobby.Join(this)); case "NORMAL_GAME": return(QueueLobby.Join(this, (int)metadata["queueId"])); default: throw new Exception("Lobby type not found: " + invite.InviteType); } } }
internal QueueLobbyMember(Member member, QueueLobby lobby) : base(lobby) { Update(member); }