示例#1
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();

            LastUpdateTrial = reader.Integer();

            RevisionDate = reader.Integer();

            reader.SanityCheck(Fields);
        }
        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);
        }
示例#3
0
 public DatabaseReader ExecuteReader()
 {
     Start();
     DbDataReader reader = Command.ExecuteReader();
     Stop();
     DatabaseReader wrappedReader = new DatabaseReader(reader);
     return wrappedReader;
 }
示例#4
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 SummonerComment(DatabaseReader reader)
        {
            CommentId = reader.Integer();
            SummonerId = reader.Integer();

            CommenterName = reader.String();
            Comment = reader.String();

            Date = reader.Time();

            reader.SanityCheck(Fields);
        }
示例#6
0
文件: Game.cs 项目: Rejna/RiotControl
        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);
        }
        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());
        }
示例#8
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);
        }
 public ExtendedPlayer(DatabaseReader reader, bool useItemArray)
     : base(reader, useItemArray)
 {
 }
示例#10
0
 protected virtual void PerformExtendedReading(DatabaseReader reader)
 {
     reader.SanityCheck(Fields);
 }
示例#11
0
        public Player(DatabaseReader reader)
        {
            GameId = reader.Integer();
            TeamId = reader.Integer();
            SummonerId = reader.Integer();

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

            PremadeSize = reader.Integer();

            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 = ParseItemString(reader.String());

            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);
        }
示例#12
0
 public ExtendedPlayer(DatabaseReader reader, bool useItemArray)
     : base(reader, useItemArray)
 {
 }
示例#13
0
 protected virtual void PerformExtendedReading(DatabaseReader reader)
 {
     //reader.SanityCheck(Fields);
 }
示例#14
0
        public Player(DatabaseReader reader, bool useItemArray)
        {
            GameId     = reader.Integer();
            TeamId     = reader.Integer();
            SummonerId = reader.Integer();

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

            PremadeSize = reader.Integer();

            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();

            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();

            //Items require special treatment as they are stored as either an array or in several fields
            if (useItemArray)
            {
                Items = ParseItemString(reader.String());
            }
            else
            {
                Items = new int[ItemCount];
                for (int i = 1; i <= ItemCount; i++)
                {
                    string field      = string.Format("item{0}", i);
                    object itemObject = reader.Get(field);
                    Items[i - 1] = (int)itemObject;
                }
            }

            PerformExtendedReading(reader);
        }
示例#15
0
 public ExtendedPlayer(DatabaseReader reader)
     : base(reader)
 {
 }
示例#16
0
        public Player(DatabaseReader reader, bool useItemArray)
        {
            GameId = reader.Integer();
            TeamId = reader.Integer();
            SummonerId = reader.Integer();

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

            PremadeSize = reader.Integer();

            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();

            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();

            //Items require special treatment as they are stored as either an array or in several fields
            if (useItemArray)
                Items = ParseItemString(reader.String());
            else
            {
                Items = new int[ItemCount];
                for (int i = 1; i <= ItemCount; i++)
                {
                    string field = string.Format("item{0}", i);
                    object itemObject = reader.Get(field);
                    Items[i - 1] = (int)itemObject;
                }
            }

            PerformExtendedReading(reader);
        }