public SummonerRankedStatistics(DatabaseReader reader)
        {
            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);
        }
Пример #2
0
        public Summoner(DatabaseReader reader)
        {
            Id = reader.Integer();

            Region = (RegionType)reader.Integer();

            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>();
        }
Пример #3
0
 public DatabaseReader ExecuteReader()
 {
     Start();
     DbDataReader reader = Command.ExecuteReader();
     Stop();
     DatabaseReader wrappedReader = new DatabaseReader(reader);
     return wrappedReader;
 }
Пример #4
0
        protected override void PerformExtendedReading(DatabaseReader reader)
        {
            InternalGameId = reader.Integer();

            Map = (MapType)reader.Integer();
            GameMode = (GameModeType)reader.Integer();

            GameTime = reader.Time();

            reader.SanityCheck(GetExtendedFields());
        }
Пример #5
0
        public RunePage(DatabaseReader reader)
        {
            Id = reader.Integer();
            Name = reader.String();
            IsCurrentRunePage = reader.Boolean();
            TimeCreated = reader.Integer();

            Slots = new List<RuneSlot>();

            reader.SanityCheck(Fields);
        }
        public AggregatedChampionStatistics(DatabaseReader reader)
        {
            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);
        }
Пример #7
0
        public Game(DatabaseReader reader)
        {
            Id = reader.Integer();

            GameId = reader.Integer();

            Map = reader.Map();
            GameMode = reader.GameMode();

            GameTime = reader.Time();

            BlueTeamWon = reader.Boolean();

            BlueTeamId = reader.Integer();
            PurpleTeamId = reader.Integer();

            reader.SanityCheck(Fields);
        }
Пример #8
0
        protected override void PerformExtendedReading(DatabaseReader reader)
        {
            InternalGameId = reader.Integer();

            Map = reader.Map();
            GameMode = reader.GameMode();

            GameTime = reader.Integer();

            int blueTeamId = reader.Integer();
            int purpleTeamId = reader.Integer();

            BlueTeamWon = reader.Boolean();

            IsBlueTeam = blueTeamId == TeamId;

            Won = IsBlueTeam == BlueTeamWon;

            reader.SanityCheck(GetExtendedFields());
        }
Пример #9
0
        public Summoner(DatabaseReader reader)
        {
            Id = reader.Integer();

            Region = (RegionType)reader.Integer();

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

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

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

            HasBeenUpdated = reader.Boolean();

            UpdateAutomatically = reader.Boolean();

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

            reader.SanityCheck(Fields);
        }
Пример #10
0
 public GameTeamPlayer(DatabaseReader reader)
     : base(reader)
 {
 }
Пример #11
0
 protected virtual void PerformExtendedReading(DatabaseReader reader)
 {
     reader.SanityCheck(Fields);
 }
Пример #12
0
        public TeamPlayer(DatabaseReader reader)
        {
            GameId = reader.Integer();
            TeamId = reader.Integer();
            SummonerId = reader.Integer();

            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);
        }
Пример #13
0
 void LoadItemInformation()
 {
     Items = new Dictionary<int, ItemInformation>();
     using (NpgsqlConnection database = DatabaseProvider.GetConnection())
     {
         DatabaseCommand select = GetCommand("select item_id, item_name, description from item_information", database);
         using (NpgsqlDataReader dataReader = select.ExecuteReader())
         {
             while (dataReader.Read())
             {
                 DatabaseReader reader = new DatabaseReader(dataReader);
                 int id = reader.Integer();
                 string name = reader.String();
                 string description = reader.String();
                 ItemInformation item = new ItemInformation(id, name, description);
                 Items[id] = item;
             }
         }
     }
 }
Пример #14
0
 public ExtendedPlayer(DatabaseReader reader)
     : base(reader)
 {
 }