Exemplo n.º 1
0
        private byte[] statDelta1(GhostStats stats)
        {
            List <byte> statDeltas = new List <byte>();

            this.AddStat(statDeltas, this.CreateStatDelta(this.gamesplayed, stats.GamesPlayed));
            this.AddStat(statDeltas, this.CreateStatDelta(this.wins, stats.Wins));
            this.AddStat(statDeltas, this.CreateStatDelta(this.losses, stats.Losses));
            this.AddStat(statDeltas, this.CreateStatDelta(this.ties, stats.Ties));
            this.AddStat(statDeltas, this.CreateStatDelta(this.winstreak, stats.WinStreak));
            this.AddStat(statDeltas, this.CreateStatDelta(this.kills, stats.Kills));
            this.AddStat(statDeltas, this.CreateStatDelta(this.deaths, stats.Deaths));
            this.AddStat(statDeltas, this.CreateStatDelta(this.assists, stats.Assists));
            this.AddStat(statDeltas, this.CreateStatDelta(this.suicides, stats.Suicides));
            this.AddStat(statDeltas, this.CreateStatDelta(this.killstreak, stats.KillStreak));
            this.AddStat(statDeltas, this.CreateStatDelta(this.hits, stats.Hits));
            this.AddStat(statDeltas, this.CreateStatDelta(this.misses, stats.Misses));
            this.AddStat(statDeltas, this.CreateStatDelta(this.headshots, stats.Headshots));
            this.AddStat(statDeltas, this.CreateStatDelta(this.totalshots, stats.TotalShots));
            this.AddStat(statDeltas, this.CreateStatDelta(this.captures, stats.Captures));
            this.AddStat(statDeltas, this.CreateStatDelta(this.defends, stats.Defends));
            this.AddStat(statDeltas, this.CreateStatDelta(this.destructions, stats.Destructions));
            this.AddStat(statDeltas, this.CreateStatDelta(this.defuses, stats.Defuses));
            this.AddStat(statDeltas, this.CreateStatDelta(this.confirmed, stats.Confirmed));
            this.AddStat(statDeltas, this.CreateStatDelta(this.denied, stats.Denied));
            this.AddStat(statDeltas, this.CreateStatDelta(this.plants, stats.Plants));
            this.AddStat(statDeltas, this.CreateStatDelta(this.returns, stats.Returns));
            this.AddStat(statDeltas, this.CreateStatDelta(this.squadpoints, stats.SquadPoints));
            this.AddStat(statDeltas, this.CreateStatDelta(this.score, stats.Score));
            this.AddStat(statDeltas, this.CreateStatDelta(this.timeplayed, (int)((stats.MinutesPlayed * 60) + (stats.HoursPlayed * 0xe10))));
            if (stats.Kills != 0)
            {
                this.AddStat(statDeltas, this.CreateStatDelta(this.kdratio, (int)((stats.Kills * 0x3e8) / stats.Deaths)));
                this.AddStat(statDeltas, this.CreateStatDelta(this.winlossratio, (int)((stats.Wins * 0x3e8) / stats.Losses)));
                this.AddStat(statDeltas, this.CreateStatDelta(this.accuracy, (int)((stats.Hits * 0x2710) / stats.TotalShots)));
            }
            this.AddStat(statDeltas, this.CreateStatDelta(this.prestige, (int)this.numericUpDown1.Value));
            this.AddStat(statDeltas, this.CreateStatDelta(this.prestigeData, this.GetPrestigeBytes((int)this.numericUpDown1.Value)));
            this.AddStat(statDeltas, this.CreateStatDelta(this.squadmembers + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown2.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + this.squadmemberlen) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown3.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 2)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown4.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 3)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown5.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 4)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown6.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 5)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown7.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 6)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown8.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 7)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown9.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 8)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown10.Value] + 500)));
            this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 9)) + this.squadmemberxp, (int)(this.GhostLevels[(int)this.numericUpDown11.Value] + 500)));
            return(this.FinalizeStatDelta(statDeltas.ToArray()));
        }
 private byte[] statDelta1(GhostStats stats)
 {
     List<byte> statDeltas = new List<byte>();
     this.AddStat(statDeltas, this.CreateStatDelta(this.gamesplayed, stats.GamesPlayed));
     this.AddStat(statDeltas, this.CreateStatDelta(this.wins, stats.Wins));
     this.AddStat(statDeltas, this.CreateStatDelta(this.losses, stats.Losses));
     this.AddStat(statDeltas, this.CreateStatDelta(this.ties, stats.Ties));
     this.AddStat(statDeltas, this.CreateStatDelta(this.winstreak, stats.WinStreak));
     this.AddStat(statDeltas, this.CreateStatDelta(this.kills, stats.Kills));
     this.AddStat(statDeltas, this.CreateStatDelta(this.deaths, stats.Deaths));
     this.AddStat(statDeltas, this.CreateStatDelta(this.assists, stats.Assists));
     this.AddStat(statDeltas, this.CreateStatDelta(this.suicides, stats.Suicides));
     this.AddStat(statDeltas, this.CreateStatDelta(this.killstreak, stats.KillStreak));
     this.AddStat(statDeltas, this.CreateStatDelta(this.hits, stats.Hits));
     this.AddStat(statDeltas, this.CreateStatDelta(this.misses, stats.Misses));
     this.AddStat(statDeltas, this.CreateStatDelta(this.headshots, stats.Headshots));
     this.AddStat(statDeltas, this.CreateStatDelta(this.totalshots, stats.TotalShots));
     this.AddStat(statDeltas, this.CreateStatDelta(this.captures, stats.Captures));
     this.AddStat(statDeltas, this.CreateStatDelta(this.defends, stats.Defends));
     this.AddStat(statDeltas, this.CreateStatDelta(this.destructions, stats.Destructions));
     this.AddStat(statDeltas, this.CreateStatDelta(this.defuses, stats.Defuses));
     this.AddStat(statDeltas, this.CreateStatDelta(this.confirmed, stats.Confirmed));
     this.AddStat(statDeltas, this.CreateStatDelta(this.denied, stats.Denied));
     this.AddStat(statDeltas, this.CreateStatDelta(this.plants, stats.Plants));
     this.AddStat(statDeltas, this.CreateStatDelta(this.returns, stats.Returns));
     this.AddStat(statDeltas, this.CreateStatDelta(this.squadpoints, stats.SquadPoints));
     this.AddStat(statDeltas, this.CreateStatDelta(this.score, stats.Score));
     this.AddStat(statDeltas, this.CreateStatDelta(this.timeplayed, (int) ((stats.MinutesPlayed * 60) + (stats.HoursPlayed * 0xe10))));
     if (stats.Kills != 0)
     {
         this.AddStat(statDeltas, this.CreateStatDelta(this.kdratio, (int) ((stats.Kills * 0x3e8) / stats.Deaths)));
         this.AddStat(statDeltas, this.CreateStatDelta(this.winlossratio, (int) ((stats.Wins * 0x3e8) / stats.Losses)));
         this.AddStat(statDeltas, this.CreateStatDelta(this.accuracy, (int) ((stats.Hits * 0x2710) / stats.TotalShots)));
     }
     this.AddStat(statDeltas, this.CreateStatDelta(this.prestige, (int) this.numericUpDown1.Value));
     this.AddStat(statDeltas, this.CreateStatDelta(this.prestigeData, this.GetPrestigeBytes((int) this.numericUpDown1.Value)));
     this.AddStat(statDeltas, this.CreateStatDelta(this.squadmembers + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown2.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + this.squadmemberlen) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown3.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 2)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown4.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 3)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown5.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 4)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown6.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 5)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown7.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 6)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown8.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 7)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown9.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 8)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown10.Value] + 500)));
     this.AddStat(statDeltas, this.CreateStatDelta((this.squadmembers + (this.squadmemberlen * 9)) + this.squadmemberxp, (int) (this.GhostLevels[(int) this.numericUpDown11.Value] + 500)));
     return this.FinalizeStatDelta(statDeltas.ToArray());
 }
 private void Form1_Shown(object sender, EventArgs e)
 {
     this.stat = new GhostStats();
     this.propertyGrid1.SelectedObject = this.stat;
 }
Exemplo n.º 4
0
 private void Form1_Shown(object sender, EventArgs e)
 {
     this.stat = new GhostStats();
     this.propertyGrid1.SelectedObject = this.stat;
 }