예제 #1
0
        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);
        }
예제 #2
0
        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);
        }