Ejemplo n.º 1
0
        private static void addSummonerIDs(Configuration config)
        {
            PublicSummoner summ;
            List<SummonerCrawler> list = new List<SummonerCrawler>();
            SummonerCrawler curSummoner;

            RiotConnect pvpnet = new RiotConnect(config, "wesa001", "baylife13");
            DADatabase db = new DADatabase();

            db.getTrackedSummoners(ref list);

            while (!pvpnet.Connected);

            for (int i = 0; i < list.Count; i++)
            {
                curSummoner = list.ElementAt(i);
                if (curSummoner.summonerId == 0 || curSummoner.accountId == 0)
                {
                    if ((summ = pvpnet.RPC.GetSummonerByName(curSummoner.summonerName)) != null)
                    {
                        db.updateSummonerByName("summoner_id", summ.summonerId.ToString(), curSummoner.summonerName);
                        db.updateSummonerByName("account_id", summ.acctId.ToString(), curSummoner.summonerName);
                        Console.Out.WriteLine("ADDED SUMMONER = " + curSummoner.summonerName);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public RiotCrawl(Configuration config)
        {
            summonersList = new List<SummonerCrawler>();
            db = new DADatabase();

            if (db.getTrackedSummoners(ref summonersList))
            {
                crawl(config);
            }
        }