public GameMember(ObfuscatedParticipant obf, int pickTurn) : this(obf.GameUniqueId) { Name = obf.SummonerName; Active = obf.PickTurn == pickTurn; }
public async void InitializePop(GameDTO InitialDTO) { List <Participant> AllParticipants = InitialDTO.TeamOne; AllParticipants.AddRange(InitialDTO.TeamTwo); if (InitialDTO.TeamOne[0] is ObfuscatedParticipant) { ReverseString = true; } AllParticipants = AllParticipants.Distinct().ToList(); //Seems to have fixed the queuepopoverlay page crashing. //whichever team you're on sometimes duplicates and could not find a reason as it doesn't happen a lot. int i = 1; foreach (Participant p in AllParticipants) { QueuePopPlayer player = new QueuePopPlayer(); player.Width = 264; player.Height = 70; if (p is PlayerParticipant) { PlayerParticipant playerPart = (PlayerParticipant)p; if (!String.IsNullOrEmpty(playerPart.SummonerName)) { player.PlayerLabel.Content = playerPart.SummonerName; player.RankLabel.Content = ""; Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(async() => { var playerLeagues = await Client.PVPNet.GetAllLeaguesForPlayer(playerPart.SummonerId); foreach (LeagueListDTO x in playerLeagues.SummonerLeagues) { if (x.Queue == "RANKED_SOLO_5x5") { player.RankLabel.Content = x.Tier + " " + x.RequestorsRank; } } if (String.IsNullOrEmpty(player.RankLabel.Content.ToString())) { player.RankLabel.Content = "Unranked"; } })); Team1ListBox.Items.Add(player); } else { Client.Log(playerPart.SummonerId.ToString()); player.PlayerLabel.Content = "Summoner " + i; i++; player.RankLabel.Content = ""; Team2ListBox.Items.Add(player); } } else { ObfuscatedParticipant oPlayer = p as ObfuscatedParticipant; player.PlayerLabel.Content = "Summoner " + (oPlayer.GameUniqueId - (oPlayer.GameUniqueId > 5 ? 5 : 0)); player.RankLabel.Content = ""; Team2ListBox.Items.Add(player); } } if (Client.AutoAcceptQueue) { await Client.PVPNet.AcceptPoppedGame(true); } }
public ChampSelectPlayer(ObfuscatedParticipant obfusc, PlayerChampionSelectionDTO selection) : this() { DisplaySelection(selection); NameLabel.Visibility = Visibility.Collapsed; }