Example #1
0
 public Match()
 {
     kills  = new MTObservableCollection <Kill>();
     CTWins = 0;
     TWins  = 0;
     Kills.Clear();
     HeadshotPercent          = 0.0f;
     TotalDeaths              = 0;
     datePlayed               = DateTime.Now;
     Kills.CollectionChanged += Kills_CollectionChanged;
 }
Example #2
0
        public void ResetStats()
        {
            AssistCount           = 0;
            BombDefusedCount      = 0;
            BombExplodedCount     = 0;
            BombPlantedCount      = 0;
            CrouchKillCount       = 0;
            DecoyThrownCount      = 0;
            DeathCount            = 0;
            EseaRws               = 0;
            EseaRwsPointCount     = 0;
            FiveKillCount         = 0;
            FlashbangThrownCount  = 0;
            FlashDurationTemp     = 0;
            FourKillCount         = 0;
            HasBomb               = false;
            HasEntryHoldKill      = false;
            HasEntryKill          = false;
            HeadshotCount         = 0;
            HeGrenadeThrownCount  = 0;
            IncendiaryThrownCount = 0;
            IsAlive               = true;
            IsConnected           = true;
            IsControllingBot      = false;
            JumpKillCount         = 0;
            KillCount             = 0;
            MolotovThrownCount    = 0;
            OneKillCount          = 0;
            RatingHltv            = 0;
            RatingHltv2           = 0;
            RoundMvpCount         = 0;
            RoundPlayedCount      = 0;
            Score            = 0;
            SmokeThrownCount = 0;
            TeamKillCount    = 0;
            ThreeKillCount   = 0;
            TradeDeathCount  = 0;
            TradeKillCount   = 0;
            TwoKillCount     = 0;

            Assists.Clear();
            Clutches.Clear();
            Deaths.Clear();
            EntryHoldKills.Clear();
            EntryKills.Clear();
            EquipementValueRounds.Clear();
            Kills.Clear();
            PlayersHurted.Clear();
            RoundsMoneyEarned.Clear();
            StartMoneyRounds.Clear();
            TimeDeathRounds.Clear();
        }
Example #3
0
        public void Reset(int tick)
        {
            AverageHealthDamagePerPlayer = 0;
            BombDefused           = null;
            BombDefusedCount      = 0;
            BombExploded          = null;
            BombExplodedCount     = 0;
            BombPlanted           = null;
            BombPlantedCount      = 0;
            CrouchKillCount       = 0;
            DamageArmorCount      = 0;
            DamageHealthCount     = 0;
            DecoyThrownCount      = 0;
            EntryHoldKillEvent    = null;
            EntryKillEvent        = null;
            EquipementValueTeamCt = 0;
            EquipementValueTeamT  = 0;
            FiveKillCount         = 0;
            FourKillCount         = 0;
            IncendiaryThrownCount = 0;
            JumpKillCount         = 0;
            KillCount             = 0;
            MolotovThrownCount    = 0;
            OneKillCount          = 0;
            SideTrouble           = Side.None;
            SmokeThrownCount      = 0;
            TeamTroubleName       = string.Empty;
            ThreeKillCount        = 0;
            TradeKillCount        = 0;
            Tick         = tick;
            Type         = RoundType.NORMAL;
            TwoKillCount = 0;
            WinnerName   = string.Empty;
            WinnerSide   = Side.None;

            ExplosiveGrenadesExploded.Clear();
            FlashbangsExploded.Clear();
            Kills.Clear();
            PlayersHurted.Clear();
            SmokeStarted.Clear();
            WeaponFired.Clear();
        }
Example #4
0
 public void ResetStats()
 {
     KillCount         = 0;
     DeathCount        = 0;
     AssistCount       = 0;
     HeadshotCount     = 0;
     TeamKillCount     = 0;
     RoundMvpCount     = 0;
     OneKillCount      = 0;
     TwoKillCount      = 0;
     ThreeKillCount    = 0;
     FourKillCount     = 0;
     FiveKillCount     = 0;
     BombDefusedCount  = 0;
     BombPlantedCount  = 0;
     Score             = 0;
     RatingHltv        = 0;
     RoundPlayedCount  = 0;
     FlashDurationTemp = 0;
     CrouchKillCount   = 0;
     JumpKillCount     = 0;
     TradeKillCount    = 0;
     TradeDeathCount   = 0;
     EseaRws           = 0;
     EseaRwsPointCount = 0;
     HasEntryKill      = false;
     HasEntryHoldKill  = false;
     Kills.Clear();
     Deaths.Clear();
     Assists.Clear();
     EntryKills.Clear();
     EntryHoldKills.Clear();
     PlayersHurted.Clear();
     Clutches.Clear();
     StartMoneyRounds.Clear();
     EquipementValueRounds.Clear();
     RoundsMoneyEarned.Clear();
 }
Example #5
0
        /// <summary>
        /// Restore player's data from a Player object
        /// </summary>
        /// <param name="player"></param>
        public void BackupFromPlayer(Player player)
        {
            Kills.Clear();
            foreach (KillEvent e in player.Kills)
            {
                Kills.Add(e);
            }

            Deaths.Clear();
            foreach (KillEvent e in player.Deaths)
            {
                Deaths.Add(e);
            }

            Assists.Clear();
            foreach (KillEvent e in player.Assists)
            {
                Assists.Add(e);
            }

            Clutches.Clear();
            foreach (ClutchEvent e in player.Clutches)
            {
                Clutches.Add(e);
            }

            EntryHoldKills.Clear();
            foreach (EntryHoldKillEvent e in player.EntryHoldKills)
            {
                EntryHoldKills.Add(e);
            }

            EntryKills.Clear();
            foreach (EntryKillEvent e in player.EntryKills)
            {
                EntryKills.Add(e);
            }

            PlayersHurted.Clear();
            foreach (PlayerHurtedEvent e in player.PlayersHurted)
            {
                PlayersHurted.Add(e);
            }

            RoundsMoneyEarned.Clear();
            foreach (KeyValuePair <int, int> kvp in player.RoundsMoneyEarned)
            {
                RoundsMoneyEarned.Add(kvp.Key, kvp.Value);
            }

            StartMoneyRounds.Clear();
            foreach (KeyValuePair <int, int> kvp in player.StartMoneyRounds)
            {
                StartMoneyRounds.Add(kvp.Key, kvp.Value);
            }

            EquipementValueRounds.Clear();
            foreach (KeyValuePair <int, int> kvp in player.EquipementValueRounds)
            {
                EquipementValueRounds.Add(kvp.Key, kvp.Value);
            }

            AssistCount           = player.AssistCount;
            BombDefusedCount      = player.BombDefusedCount;
            BombExplodedCount     = player.BombExplodedCount;
            BombPlantedCount      = player.BombPlantedCount;
            CrouchKillCount       = player.CrouchKillCount;
            DeathCount            = player.DeathCount;
            DecoyThrownCount      = player.DecoyThrownCount;
            EseaRws               = player.EseaRws;
            EseaRwsPointCount     = player.EseaRwsPointCount;
            FiveKillCount         = player.FiveKillCount;
            FlashbangThrownCount  = player.FlashbangThrownCount;
            FlashDurationTemp     = player.FlashDurationTemp;
            FourKillCount         = player.FourKillCount;
            HasBomb               = player.HasBomb;
            HasEntryHoldKill      = player.HasEntryHoldKill;
            HasEntryKill          = player.HasEntryKill;
            HeadshotCount         = player.HeadshotCount;
            HeGrenadeThrownCount  = player.HeGrenadeThrownCount;
            IsAlive               = player.IsAlive;
            IncendiaryThrownCount = player.IncendiaryThrownCount;
            IsConnected           = player.IsConnected;
            IsControllingBot      = player.IsControllingBot;
            JumpKillCount         = player.JumpKillCount;
            KillCount             = player.KillCount;
            MolotovThrownCount    = player.MolotovThrownCount;
            OneKillCount          = player.OneKillCount;
            RatingHltv            = player.RatingHltv;
            RoundMvpCount         = player.RoundMvpCount;
            RoundPlayedCount      = player.RoundPlayedCount;
            Score            = player.Score;
            Side             = player.Side;
            SmokeThrownCount = player.SmokeThrownCount;
            TeamKillCount    = player.TeamKillCount;
            TeamName         = player.TeamName;
            ThreeKillCount   = player.ThreeKillCount;
            TradeDeathCount  = player.TradeDeathCount;
            TradeKillCount   = player.TradeKillCount;
            TwoKillCount     = player.TwoKillCount;
        }
Example #6
0
 public void ResetStats(bool resetTeams = true)
 {
     DispatcherHelper.CheckBeginInvokeOnUI(delegate
     {
         AverageHealthDamage   = 0;
         AverageHltvRating     = 0;
         AverageEseaRws        = 0;
         AssistPerRound        = 0;
         DeathPerRound         = 0;
         KillPerRound          = 0;
         DamageHealthCount     = 0;
         DamageArmorCount      = 0;
         MvpCount              = 0;
         KillCount             = 0;
         KnifeKillCount        = 0;
         TeamKillCount         = 0;
         HeadshotCount         = 0;
         AssistCount           = 0;
         DeathCount            = 0;
         SmokeThrownCount      = 0;
         FlashbangThrownCount  = 0;
         HeadshotCount         = 0;
         DecoyThrownCount      = 0;
         MolotovThrownCount    = 0;
         IncendiaryThrownCount = 0;
         HitCount              = 0;
         WeaponFiredCount      = 0;
         AssistPerRound        = 0;
         DeathPerRound         = 0;
         OneKillCount          = 0;
         TwoKillCount          = 0;
         ThreeKillCount        = 0;
         FourKillCount         = 0;
         FiveKillCount         = 0;
         ScoreTeam1            = 0;
         ScoreTeam2            = 0;
         ScoreFirstHalfTeam1   = 0;
         ScoreFirstHalfTeam2   = 0;
         ScoreSecondHalfTeam1  = 0;
         ScoreSecondHalfTeam2  = 0;
         Rounds.Clear();
         WeaponFired.Clear();
         Kills.Clear();
         Overtimes.Clear();
         PositionPoints.Clear();
         MolotovsFireStarted.Clear();
         DecoyStarted.Clear();
         BombPlanted.Clear();
         BombDefused.Clear();
         BombExploded.Clear();
         BombPlanted.Clear();
         BombDefused.Clear();
         BombExploded.Clear();
         ClutchCount           = 0;
         ClutchLostCount       = 0;
         ClutchWonCount        = 0;
         EntryKillCount        = 0;
         MostBombPlantedPlayer = null;
         MostEntryKillPlayer   = null;
         MostHeadshotPlayer    = null;
         MostKillingWeapon     = null;
         HasCheater            = false;
         PlayersHurted.Clear();
         PlayerBlinded.Clear();
         Winner    = null;
         Surrender = null;
         if (resetTeams)
         {
             Players.Clear();
             TeamCT.Clear();
             TeamT.Clear();
         }
         else
         {
             foreach (Player playerExtended in Players)
             {
                 playerExtended.ResetStats();
             }
         }
     });
 }