コード例 #1
0
ファイル: Summoner.cs プロジェクト: nolanlum/MyRiotControl
        public Summoner(DbDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            Id = reader.Integer();

            Region = reader.String().ToRegionType();

            AccountId = reader.Integer();
            SummonerId = reader.Integer();

            SummonerName = reader.String();
            InternalName = reader.String();

            SummonerLevel = reader.Integer();
            ProfileIcon = reader.Integer();

            UpdateAutomatically = reader.Boolean();

            TimeCreated = reader.Time();
            TimeUpdated = reader.Time();

            reader.SanityCheck(Fields);

            Ratings = new List<SummonerRating>();
            RatingDictionary = new Dictionary<MapType, Dictionary<GameModeType, SummonerRating>>();
            RankedStatistics = new List<SummonerRankedStatistics>();
        }
コード例 #2
0
        public SummonerRating(DbDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            Map = reader.String().ToMapType();
            GameMode = reader.String().ToGameModeType();

            Wins = reader.Integer();
            Losses = reader.Integer();
            Leaves = reader.Integer();

            CurrentRating = reader.MaybeInteger();
            TopRating = reader.MaybeInteger();

            reader.SanityCheck(Fields);
        }
コード例 #3
0
ファイル: GameTeamPlayer.cs プロジェクト: andor44/RiotControl
        protected override void PerformExtendedReading(Reader reader)
        {
            InternalGameId = reader.Integer();

            Map = reader.String().ToMapType();
            GameMode = reader.String().ToGameModeType();

            GameTime = reader.Time();

            reader.SanityCheck(GetExtendedFields());
        }
コード例 #4
0
ファイル: Game.cs プロジェクト: nolanlum/MyRiotControl
        public Game(NpgsqlDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            Id = reader.Integer();

            GameId = reader.Integer();

            Map = reader.String().ToMapType();
            GameMode = reader.String().ToGameModeType();

            GameTime = reader.Time();

            Team1Won = reader.Boolean();

            Team1Id = reader.Integer();
            Team2Id = reader.Integer();

            reader.SanityCheck(Fields);
        }
コード例 #5
0
        public AggregatedChampionStatistics(DbDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            ChampionId = reader.Integer();

            Wins = reader.Integer();
            Losses = reader.Integer();

            Kills = reader.Integer();
            Deaths = reader.Integer();
            Assists = reader.Integer();

            Gold = reader.Integer();

            MinionKills = reader.Integer();

            reader.SanityCheck(Fields);
        }
コード例 #6
0
        public SummonerRankedStatistics(DbDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            ChampionId = reader.Integer();

            Wins = reader.Integer();
            Losses = reader.Integer();

            Kills = reader.Integer();
            Deaths = reader.Integer();
            Assists = reader.Integer();

            MinionKills = reader.Integer();

            Gold = reader.Integer();

            TurretsDestroyed = reader.Integer();

            DamageDealt = reader.Integer();
            PhysicalDamageDealt = reader.Integer();
            MagicalDamageDealt = reader.Integer();

            DamageTaken = reader.Integer();

            DoubleKills = reader.Integer();
            TripleKills = reader.Integer();
            QuadraKills = reader.Integer();
            PentaKills = reader.Integer();

            TimeSpentDead = reader.Integer();

            MaximumKills = reader.Integer();
            MaximumDeaths = reader.Integer();

            reader.SanityCheck(Fields);
        }
コード例 #7
0
ファイル: TeamPlayer.cs プロジェクト: nolanlum/MyRiotControl
        public TeamPlayer(DbDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            GameId = reader.Integer();
            TeamId = reader.Integer();
            SummonerId = reader.Integer();

            Won = reader.Boolean();

            Ping = reader.Integer();
            TimeSpentInQueue = reader.Integer();

            PremadeSize = reader.Integer();

            KCoefficient = reader.Integer();
            ProbabilityOfWinning = reader.Double();

            Rating = reader.MaybeInteger();
            RatingChange = reader.MaybeInteger();
            AdjustedRating = reader.MaybeInteger();
            TeamRating = reader.MaybeInteger();

            ExperienceEarned = reader.Integer();
            BoostedExperienceEarned = reader.Integer();

            IPEarned = reader.Integer();
            BoostedIPEarned = reader.Integer();

            SummonerLevel = reader.Integer();

            SummonerSpell1 = reader.Integer();
            SummonerSpell2 = reader.Integer();

            ChampionId = reader.Integer();

            //May be null
            SkinName = reader.String();
            SkinIndex = reader.Integer();

            ChampionLevel = reader.Integer();

            //Not sure about this
            var tmp = reader.Get();
            Items = tmp as int[];

            if (Items == null)
            {
                var items = tmp as byte[];
                var itemspad = new byte[items.Length + items.Length % 4];
                Array.Copy(items, itemspad, items.Length);
                Items = new int[itemspad.Length / 4];

                for (int i = 0; i < itemspad.Length / 4; i++)
                    Items[i] = BitConverter.ToInt32(itemspad, i * 4);
            }

            Kills = reader.Integer();
            Deaths = reader.Integer();
            Assists = reader.Integer();

            MinionKills = reader.Integer();

            Gold = reader.Integer();

            DamageDealt = reader.Integer();
            PhysicalDamageDealt = reader.Integer();
            MagicalDamageDealt = reader.Integer();

            DamageTaken = reader.Integer();
            PhysicalDamageTaken = reader.Integer();
            MagicalDamageTaken = reader.Integer();

            TotalHealingDone = reader.Integer();

            TimeSpentDead = reader.Integer();

            LargestMultiKill = reader.Integer();
            LargestKillingSpree = reader.Integer();
            LargestCritcalStrike = reader.Integer();

            //Summoner's Rift/Twisted Treeline

            NeutralMinionsKilled = reader.MaybeInteger();

            TurretsDestroyed = reader.MaybeInteger();
            InhibitorsDestroyed = reader.MaybeInteger();

            //Dominion

            NodesNeutralised = reader.MaybeInteger();
            NodeNeutralisationAssists = reader.MaybeInteger();
            NodesCaptured = reader.MaybeInteger();

            VictoryPoints = reader.MaybeInteger();
            Objectives = reader.MaybeInteger();

            TotalScore = reader.MaybeInteger();
            ObjectiveScore = reader.MaybeInteger();
            CombatScore = reader.MaybeInteger();

            Rank = reader.MaybeInteger();

            PerformExtendedReading(reader);
        }
コード例 #8
0
ファイル: TeamPlayer.cs プロジェクト: andor44/RiotControl
        public TeamPlayer(NpgsqlDataReader dataReader)
        {
            Reader reader = new Reader(dataReader);

            GameId = reader.Integer();
            TeamId = reader.Integer();
            SummonerId = reader.Integer();

            Won = reader.Boolean();

            Ping = reader.Integer();
            TimeSpentInQueue = reader.Integer();

            PremadeSize = reader.Integer();

            KCoefficient = reader.Integer();
            ProbabilityOfWinning = reader.Double();

            Rating = reader.MaybeInteger();
            RatingChange = reader.MaybeInteger();
            AdjustedRating = reader.MaybeInteger();
            TeamRating = reader.MaybeInteger();

            ExperienceEarned = reader.Integer();
            BoostedExperienceEarned = reader.Integer();

            IPEarned = reader.Integer();
            BoostedIPEarned = reader.Integer();

            SummonerLevel = reader.Integer();

            SummonerSpell1 = reader.Integer();
            SummonerSpell2 = reader.Integer();

            ChampionId = reader.Integer();

            //May be null
            SkinName = reader.String();
            SkinIndex = reader.Integer();

            ChampionLevel = reader.Integer();

            //Not sure about this
            Items = (int[])reader.Get();

            Kills = reader.Integer();
            Deaths = reader.Integer();
            Assists = reader.Integer();

            MinionKills = reader.Integer();

            Gold = reader.Integer();

            DamageDealt = reader.Integer();
            PhysicalDamageDealt = reader.Integer();
            MagicalDamageDealt = reader.Integer();

            DamageTaken = reader.Integer();
            PhysicalDamageTaken = reader.Integer();
            MagicalDamageTaken = reader.Integer();

            TotalHealingDone = reader.Integer();

            TimeSpentDead = reader.Integer();

            LargestMultiKill = reader.Integer();
            LargestKillingSpree = reader.Integer();
            LargestCritcalStrike = reader.Integer();

            //Summoner's Rift/Twisted Treeline

            NeutralMinionsKilled = reader.MaybeInteger();

            TurretsDestroyed = reader.MaybeInteger();
            InhibitorsDestroyed = reader.MaybeInteger();

            //Dominion

            NodesNeutralised = reader.MaybeInteger();
            NodeNeutralisationAssists = reader.MaybeInteger();
            NodesCaptured = reader.MaybeInteger();

            VictoryPoints = reader.MaybeInteger();
            Objectives = reader.MaybeInteger();

            TotalScore = reader.MaybeInteger();
            ObjectiveScore = reader.MaybeInteger();
            CombatScore = reader.MaybeInteger();

            Rank = reader.MaybeInteger();

            PerformExtendedReading(reader);
        }
コード例 #9
0
ファイル: Database.cs プロジェクト: nolanlum/MyRiotControl
 void LoadItemInformation()
 {
     Items = new Dictionary<int, ItemInformation>();
     using (DbConnection database = DatabaseProvider.GetConnection())
     {
         SQLCommand select = GetCommand("select item_id, item_name, description from item_information", database);
         using (DbDataReader dataReader = select.ExecuteReader())
         {
             while (dataReader.Read())
             {
                 Reader reader = new Reader(dataReader);
                 int id = reader.Integer();
                 string name = reader.String();
                 string description = reader.String();
                 ItemInformation item = new ItemInformation(id, name, description);
                 Items[id] = item;
             }
         }
     }
 }