public static List <ChampionStatistics> GetChampionStatistics(AggregatedStats statistics) { Dictionary <int, ChampionStatistics> output = new Dictionary <int, ChampionStatistics>(); foreach (var statisticsEntry in statistics.lifetimeStatistics) { int key = statisticsEntry.championId; if (key == 0) { continue; } if (output.ContainsKey(key)) { continue; } ChampionStatistics newEntry = new ChampionStatistics(key, statistics); output[key] = newEntry; } return(output.Values.ToList()); }
void SetSummonerRankedStatisticsParameters(DatabaseCommand update, Summoner summoner, int season, ChampionStatistics champion) { update.SetFieldNames(SummonerRankedStatisticsFields); update.Set(summoner.Id); update.Set(season); update.Set(champion.ChampionId); update.Set(champion.Wins); update.Set(champion.Losses); update.Set(champion.Kills); update.Set(champion.Deaths); update.Set(champion.Assists); update.Set(champion.MinionKills); update.Set(champion.Gold); update.Set(champion.TurretsDestroyed); update.Set(champion.DamageDealt); update.Set(champion.PhysicalDamageDealt); update.Set(champion.MagicalDamageDealt); update.Set(champion.DamageTaken); update.Set(champion.DoubleKills); update.Set(champion.TripleKills); update.Set(champion.QuadraKills); update.Set(champion.PentaKills); update.Set(champion.TimeSpentDead); update.Set(champion.MaximumKills); update.Set(champion.MaximumDeaths); }
public static List<ChampionStatistics> GetChampionStatistics(AggregatedStats statistics) { Dictionary<int, ChampionStatistics> output = new Dictionary<int, ChampionStatistics>(); foreach (var statisticsEntry in statistics.lifetimeStatistics) { int key = statisticsEntry.championId; if (key == 0) continue; if (output.ContainsKey(key)) continue; ChampionStatistics newEntry = new ChampionStatistics(key, statistics); output[key] = newEntry; } return output.Values.ToList(); }
int CompareNames(ChampionStatistics x, ChampionStatistics y) { return x.Name.CompareTo(y.Name); }
int CompareChampionWinLossDifferences(ChampionStatistics x, ChampionStatistics y) { return (x.Wins - x.Losses).CompareTo(y.Wins - y.Losses); }
int CompareChampionNames(ChampionStatistics x, ChampionStatistics y) { return GetChampionName(x.ChampionId).CompareTo(GetChampionName(y.ChampionId)); }