示例#1
0
 public void AttachToQueue(MatchMakerParams matchMakerParams, string token, SearchingForMatchNotification.Callback callback)
 {
     SearchingForMatchNotification cb = new SearchingForMatchNotification(callback);
     InvokeWithCallback("matchmakerService", "attachToQueue",
         new object[] { matchMakerParams.GetBaseTypedObject(), token }, cb);
 }
示例#2
0
 public SearchingForMatchNotification AttachToQueue(MatchMakerParams matchMakerParams, string token)
 {
     int Id = Invoke("matchmakerService", "attachToQueue", new object[] { matchMakerParams.GetBaseTypedObject(), token });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     SearchingForMatchNotification result = new SearchingForMatchNotification(messageBody);
     results.Remove(Id);
     return result;
 }
示例#3
0
 private void QueueButton_Click(object sender, RoutedEventArgs e)
 {
     //to queue
     if (InQueue == false)
     {
         LastSender = (Button)sender;
         GameQueueConfig config = (GameQueueConfig)LastSender.Tag;
         //Make TeamBuilder Work for solo
         if (config.Id != 61)
         {
             if (Queues.Contains(config.Id))
             {
                 return;
             }
             Queues.Add(config.Id);
             MatchMakerParams parameters = new MatchMakerParams();
             parameters.QueueIds = new Int32[] { Convert.ToInt32(config.Id) };
             Client.PVPNet.AttachToQueue(parameters, new SearchingForMatchNotification.Callback(EnteredQueue));
             InQueue = true;
         }
         else if (config.Id == 61)
         {
             Client.SwitchPage(new TeamBuilderPage(false));
         }
     } 
     else 
     {
         LeaveAllQueues();
         InQueue = false;
     }
 }
        private async void QueueButton_Click(object sender, RoutedEventArgs e)
        {
            //so you can only be in one queue
            var keys = new List<Button>(ButtonTimers.Keys);
            foreach (Button pair in keys)
            {
                Button realButton = (Button)pair.Tag;
                realButton.Content = "Queue";
            }
            ButtonTimers = new Dictionary<Button, int>();
            Queues = new List<double>();
            await Client.PVPNet.PurgeFromQueues();


            LastSender = (Button)sender;
            GameQueueConfig config = (GameQueueConfig)LastSender.Tag;
            if (Queues.Contains(config.Id))
            {
                return;
            }
            Queues.Add(config.Id);
            MatchMakerParams parameters = new MatchMakerParams();
            parameters.QueueIds = new Int32[] { Convert.ToInt32(config.Id) };
            Client.PVPNet.AttachToQueue(parameters, new SearchingForMatchNotification.Callback(EnteredQueue));
        }
 private void StartGameButton_Click(object sender, RoutedEventArgs e)
 {
     MatchMakerParams parameters = new MatchMakerParams();
     parameters.QueueIds = new Int32[] { Convert.ToInt32(queueId) };
     parameters.InvitationId = CurrentLobby.InvitationID;
     List<int> InviteList = new List<int>();
     foreach (Member stats in CurrentLobby.Members)
     {
         int GameInvitePlayerList = Convert.ToInt32(stats.SummonerId);
         InviteList.Add(GameInvitePlayerList);
     }
     parameters.Team = InviteList;
     
     Client.PVPNet.AttachTeamToQueue(parameters, new SearchingForMatchNotification.Callback(EnteredQueue));
 }
示例#6
0
 private async void TeamQueueButton_Click(object sender, RoutedEventArgs e)
 {
     //To leave all other queues
     LeaveAllQueues();
     InQueue = false;
     LastSender = (Button)sender;
     GameQueueConfig config = (GameQueueConfig)LastSender.Tag;
     //Make Teambuilder work for duo
     if (config.Id != 61)
     {
         if (Queues.Contains(config.Id))
         {
             return;
         }
         Queues.Add(config.Id);
         MatchMakerParams parameters = new MatchMakerParams();
         parameters.QueueIds = new Int32[] { Convert.ToInt32(config.Id) };
         Client.GameQueue = Convert.ToInt32(config.Id);
         LobbyStatus Lobby = await Client.PVPNet.createArrangedTeamLobby(Convert.ToInt32(config.Id));
         Client.SwitchPage(new TeamQueuePage(Lobby.InvitationID, Lobby));
     }
     else
     {
         Client.SwitchPage(new TeamBuilderPage(true));
     }
         
 }
 private async void QueueButton_Click(object sender, RoutedEventArgs e)
 {
     //To leave all other queues
     {
     var keys = new List<Button>(ButtonTimers.Keys);
     foreach (Button pair in keys)
     {
         Button realButton = (Button)pair.Tag;
         realButton.Content = "Queue";
     }
     ButtonTimers = new Dictionary<Button, int>();
     Queues = new List<double>();
     await Client.PVPNet.PurgeFromQueues();
     }
     //To Start Queueing
     LastSender = (Button)sender;
     GameQueueConfig config = (GameQueueConfig)LastSender.Tag;
     if (Queues.Contains(config.Id))
     {
         return;
     }
     Queues.Add(config.Id);
     MatchMakerParams parameters = new MatchMakerParams();
     parameters.QueueIds = new Int32[] { Convert.ToInt32(config.Id) };
     await Client.PVPNet.createArrangedTeamLobby(Convert.ToInt32(config.Id));
     //Client.PVPNet.AttachToQueue(parameters, new SearchingForMatchNotification.Callback(EnteredQueue));
     Client.SwitchPage(new TeamQueuePage(true));
 }
 private async void StartGameButton_Click(object sender, RoutedEventArgs e)
 {
     MatchMakerParams pareams = new MatchMakerParams();
     SearchingForMatchNotification par = await Client.PVPNet.AttachTeamToQueue(pareams);
 }
        private async void StartGameButton_Click(object sender, RoutedEventArgs e)
        {
            MatchMakerParams pareams = new MatchMakerParams();
            pareams.InvitationId = 8649134;
            pareams.QueueIds = new int[1] { 2 };
            pareams.Team = new List<int>();
            pareams.Team.Add(222908);
            pareams.Team.Add(499467);
            SearchingForMatchNotification par = await Client.PVPNet.AttachTeamToQueue(pareams);

            Client.Message("sum222908", "<body><inviteId>8649134</inviteId><userName>Snooowl</userName><profileIconId>576</profileIconId><gameType>NORMAL_GAME</gameType><groupId></groupId><seasonRewards>-1</seasonRewards><mapId>1</mapId><queueId>2</queueId><gameMode>classic_pvp</gameMode><gameDifficulty></gameDifficulty></body>", ChatSubjects.VERIFY_INVITEE);
        }
 public async Task<SearchingForMatchNotification> AttachToQueue(MatchMakerParams matchMakerParams, string accessToken)
 {
     TypedObject typedObject = new TypedObject(null);
     typedObject.Add("LEAVER_BUSTER_ACCESS_TOKEN", accessToken);
     int Id = Invoke("matchmakerService", "attachToQueue", new object[] { matchMakerParams.GetBaseTypedObject(), typedObject });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     SearchingForMatchNotification result = new SearchingForMatchNotification(messageBody);
     results.Remove(Id);
     return result;
 }
 public async Task<SearchingForMatchNotification> AttachTeamToQueue(MatchMakerParams matchMakerParams)
 {
     int Id = Invoke("matchmakerService", "attachTeamToQueue", new object[] { matchMakerParams.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     SearchingForMatchNotification result = new SearchingForMatchNotification(messageBody);
     results.Remove(Id);
     return result;
 }