コード例 #1
0
        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());
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 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();
 }
コード例 #4
0
 int CompareNames(ChampionStatistics x, ChampionStatistics y)
 {
     return x.Name.CompareTo(y.Name);
 }
コード例 #5
0
ファイル: LegendaryPrompt.cs プロジェクト: ernya/LibOfLegends
 int CompareChampionWinLossDifferences(ChampionStatistics x, ChampionStatistics y)
 {
     return (x.Wins - x.Losses).CompareTo(y.Wins - y.Losses);
 }
コード例 #6
0
ファイル: LegendaryPrompt.cs プロジェクト: ernya/LibOfLegends
 int CompareChampionNames(ChampionStatistics x, ChampionStatistics y)
 {
     return GetChampionName(x.ChampionId).CompareTo(GetChampionName(y.ChampionId));
 }