public virtual async void StartQueue() { if (!IsCaptain) return; var mmp = new MatchMakerParams { InvitationId = lobbyStatus.InvitationID, QueueIds = new[] { QueueID }, Team = Members.Select(m => (int) m.SummonerID).ToList() }; var search = await RiotServices.MatchmakerService.AttachTeamToQueue(mmp); OnQueueEntered(search); }
private async void PlayRanked(int button) { Close?.Invoke(this, new EventArgs()); switch (button) { case 0: try { var mmp = new MatchMakerParams { QueueIds = new[] { selected.ID } }; queue = await Queue.Create(mmp); queue.QueuePopped += Queue_QueuePopped; queue.QueueCancelled += Queue_QueueCancelled; SetInQueue(true); } catch { } break; case 1: //TODO Ranked Duo Lobby var lobby = QueueLobby.CreateLobby(selected.ID); LoLClient.QueueManager.JoinLobby(lobby); break; } }
public static async Task<Queue> Create(MatchMakerParams mmp) { return Create(await RiotServices.MatchmakerService.AttachToQueue(mmp)); }