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); } } } }
public RiotCrawl(Configuration config) { summonersList = new List<SummonerCrawler>(); db = new DADatabase(); if (db.getTrackedSummoners(ref summonersList)) { crawl(config); } }
public CrawlWorker(CrawlWorkerData cData) { pause = false; data = cData; forceDC = false; db = new DADatabase(); summonerList = cData.summonerList; liveGames = new Dictionary<string, InGameSummoner>(); liveGameKeys = new List<string>(); stopWaitHandle = new AutoResetEvent(false); pvpnetReconnects = 0; logPath = data.loginUser + ".log"; /** Clear log file */ File.WriteAllText(logPath, String.Empty); }
public EndGameWorker(ref Dictionary<string, InGameSummoner> iGS, ref List<string> keys, Configuration cfg, string endUser, string endPass) { logPath = endUser + ".log"; /** Clear log file */ File.WriteAllText(logPath, String.Empty); inGameSummoners = iGS; inGameKeys = keys; db = new DADatabase(); config = cfg; endLoginUser = endUser; endLoginPass = endPass; stopWaitHandle = new AutoResetEvent(false); gameUpdatedElsewhere = false; pvpnetReconnects = 0; endSummonerStats = new List<EndSummonerGameStats>(); endPSummoners = new List<PublicSummoner>(); endLifeStats = new List<PlayerLifeTimeStats>(); forceDC = false; }
private static void test(Configuration config) { RiotConnect pvpnet = new RiotConnect(config, "wesa001", "baylife13"); DADatabase db = new DADatabase(); while (!pvpnet.Connected); PublicSummoner summoner = pvpnet.RPC.summoner.GetSummonerByName("coupdegrace666"); PlatformGameLifecycleDTO game = pvpnet.RPC.game.retrieveInProgressSpectatorGameInfo("coupdegrace666"); db.addInProgressGame(game, summoner.summonerId); Console.Out.WriteLine("summ id: " + summoner.summonerId); while (1 == 1) ; }