Beispiel #1
0
        /* private void cbAutoAramSkinBoost_CheckedChanged(object sender, EventArgs e)
         * {
         *   AutoSkinBoost = cbAutoAramSkinBoost.Checked;
         * }*/

        private void btnAramSkinBoost_Click(object sender, EventArgs e)
        {
            Process[] p = Process.GetProcessesByName("LeagueClientUx");
            if (p.Length != 0)
            {
                var skinboost = LCUAPI.API.LCU.GetRequest(Method.POST, "lol-champ-select/v1/team-boost/purchase");
                Console.WriteLine(skinboost);
                TeamBoost myDeserializedClass = JsonConvert.DeserializeObject <TeamBoost>(skinboost);
            }
            else
            {
                Environment.Exit(0);
            }
        }
Beispiel #2
0
        public async Task GetTeamBoost()
        {
            TeamBoost obj = null;

            try
            {
                obj = await client.ChampSelect.GetTeamBoost();
            }
            catch (LeagueClientException ex)
            {
                if (ex.Message == "No active delegate")
                {
                    Assert.Inconclusive("Not in Champ Select");
                }
                else
                {
                    throw;
                }
            }

            Assert.IsNotNull(obj);
        }
Beispiel #3
0
        private void LCUTimer_Tick(object sender, EventArgs e)
        {
            Process[] p = Process.GetProcessesByName("LeagueClientUx");
            if (p.Length != 0)
            {
                try
                {
                    string JsonReadyCheck = LCU.GetRequest(RestSharp.Method.GET, "/lol-matchmaking/v1/ready-check");
                    readyCheck = JsonConvert.DeserializeObject <Matchmaking.ReadyCheck>(JsonReadyCheck);
                    if (readyCheck.State == "InProgress" && AutoAccept)
                    {
                        LCU.GetRequest(RestSharp.Method.POST, "/lol-matchmaking/v1/ready-check/accept");
                        //API.LCU.GetRequest(RestSharp.Method.POST, "/lol-matchmaking/v1/ready-check/decline");
                    }

                    string gameflowPhase = LCU.GetRequest(RestSharp.Method.GET, "/lol-gameflow/v1/gameflow-phase");
                    if (phase != gameflowPhase)
                    {
                        phase = gameflowPhase;
                        Console.WriteLine(gameflowPhase);

                        if (phase.Contains("ChampSelect") && AutoSkinBoost && !autoSkinDo)
                        {
                            Sleep(1000);
                            autoSkinDo = true;
                            var skinboost = LCUAPI.API.LCU.GetRequest(Method.POST, "lol-champ-select/v1/team-boost/purchase");
                            Console.WriteLine(skinboost);
                            TeamBoost myDeserializedClass = JsonConvert.DeserializeObject <TeamBoost>(skinboost);
                        }
                        else if (!phase.Contains("ChampSelect"))
                        {
                            autoSkinDo = false;
                        }
                    }
                } catch { }
            }
        }