The class with all statistical summary of a certain queue type. Like ranked5v5, normal5v5, etc.
Inheritance: AbstractDomainObject
コード例 #1
0
ファイル: UpdateSummoner.cs プロジェクト: tsubus/RiotControl
        void SetSummaryParameters(DatabaseCommand command, MapType map, GameModeType gameMode, Summoner summoner, PlayerStatSummary summary, bool forceNullRating)
        {
            if (forceNullRating)
            {
                command.Set("current_rating", DbType.Int32, null);
                command.Set("top_rating", DbType.Int32, null);
            }
            else
            {
                //Zero rating means that the Elo is below 1200 and is not revealed by the server
                if (summary.rating == 0)
                    command.Set("current_rating", DbType.Int32, null);
                else
                    command.Set("current_rating", summary.rating);
                command.Set("top_rating", summary.maxRating);
            }

            command.Set("summoner_id", summoner.Id);
            command.Set("map", (int)map);
            command.Set("game_mode", (int)gameMode);

            command.Set("wins", summary.wins);
            command.Set("losses", summary.losses);
            command.Set("leaves", summary.leaves);
        }
コード例 #2
0
        void SetSummaryParameters(DatabaseCommand command, MapType map, GameModeType gameMode, Summoner summoner, PlayerStatSummary summary, bool forceNullRating)
        {
            if (forceNullRating)
            {
                command.Set("current_rating", DbType.Int32, DBNull.Value);
                command.Set("top_rating", DbType.Int32, DBNull.Value);
            }
            else
            {
                //Zero rating means that the Elo is below 1200 and is not revealed by the server
                if (summary.rating == 0)
                    command.Set("current_rating", DbType.Int32, DBNull.Value);
                else
                    command.Set("current_rating", summary.rating);
                command.Set("top_rating", summary.maxRating);
            }

            command.Set("summoner_id", summoner.Id);
            command.Set("map", (int)map);
            command.Set("game_mode", (int)gameMode);

            command.Set("wins", summary.wins);
            command.Set("losses", summary.losses);
            command.Set("leaves", summary.leaves);

            int k = 0, d = 0, a = 0;

            var kills = summary.aggregatedStats.stats.FirstOrDefault(e => e.statType == "TOTAL_CHAMPION_KILLS");
            if (kills != null)
            {
                k = kills.value;
            }

            var deaths = summary.aggregatedStats.stats.FirstOrDefault(e => e.statType == "TOTAL_DEATHS_PER_SESSION");
            if (deaths != null)
            {
                d = deaths.value;
            }

            var assists = summary.aggregatedStats.stats.FirstOrDefault(e => e.statType == "TOTAL_ASSISTS");
            if (assists != null)
            {
                a = assists.value;
            }

            command.Set("kills", k);
            command.Set("deaths", d);
            command.Set("assists", a);
        }
コード例 #3
0
        public int getRankedMinionKills()
        {
            PlayerStatSummary rTeam5x5 = getRankedTeam5x5();
            PlayerStatSummary rSolo5x5 = getRankedSolo5x5();
            int value = 0;

            if (rTeam5x5 != null)
            {
                value += (rTeam5x5.aggregatedStats.getMinionKills() + rTeam5x5.aggregatedStats.getNeutralMinionKills());
            }

            if (rSolo5x5 != null)
            {
                value += (rSolo5x5.aggregatedStats.getMinionKills() + rSolo5x5.aggregatedStats.getNeutralMinionKills());
            }

            return(value);
        }
コード例 #4
0
        public int getRankedTurretKills()
        {
            PlayerStatSummary rTeam5x5 = getRankedTeam5x5();
            PlayerStatSummary rSolo5x5 = getRankedSolo5x5();
            int value = 0;

            if (rTeam5x5 != null)
            {
                value += rTeam5x5.aggregatedStats.getTurretKills();
            }

            if (rSolo5x5 != null)
            {
                value += rSolo5x5.aggregatedStats.getTurretKills();
            }

            return(value);
        }