public ScrimEventAggregate Subtract(ScrimEventAggregate subtrahend)
        {
            Points   -= subtrahend.Points;
            NetScore -= subtrahend.NetScore;

            FirstCaptures      -= subtrahend.FirstCaptures;
            SubsequentCaptures -= subtrahend.SubsequentCaptures;

            FirstCapturePoints      -= subtrahend.FirstCapturePoints;
            SubsequentCapturePoints -= subtrahend.SubsequentCapturePoints;

            Kills          -= subtrahend.Kills;
            Deaths         -= subtrahend.Deaths;
            Headshots      -= subtrahend.Headshots;
            HeadshotDeaths -= subtrahend.HeadshotDeaths;
            Suicides       -= subtrahend.Suicides;
            Teamkills      -= subtrahend.Teamkills;
            TeamkillDeaths -= subtrahend.TeamkillDeaths;
            RevivesGiven   -= subtrahend.RevivesGiven;
            RevivesTaken   -= subtrahend.RevivesTaken;
            DamageAssists  -= subtrahend.DamageAssists;

            //UtilityAssists -= subtrahend.UtilityAssists;
            GrenadeAssists       -= subtrahend.GrenadeAssists;
            SpotAssists          -= subtrahend.SpotAssists;
            HealSupportAssists   -= subtrahend.HealSupportAssists;
            ProtectAlliesAssists -= subtrahend.ProtectAlliesAssists;

            DamageAssistedDeaths -= subtrahend.DamageAssistedDeaths;
            //UtilityAssistedDeaths -= subtrahend.UtilityAssistedDeaths;
            GrenadeAssistedDeaths       -= subtrahend.GrenadeAssistedDeaths;
            SpotAssistedDeaths          -= subtrahend.SpotAssistedDeaths;
            ProtectAlliesAssistedDeaths -= subtrahend.ProtectAlliesAssistedDeaths;

            DamageTeamAssists         -= subtrahend.DamageTeamAssists;
            DamageSelfAssists         -= subtrahend.DamageSelfAssists;
            GrenadeTeamAssists        -= subtrahend.GrenadeTeamAssists;
            GrenadeSelfAssists        -= subtrahend.GrenadeSelfAssists;
            DamageTeamAssistedDeaths  -= subtrahend.DamageTeamAssistedDeaths;
            DamageSelfAssistedDeaths  -= subtrahend.DamageSelfAssistedDeaths;
            GrenadeTeamAssistedDeaths -= subtrahend.GrenadeTeamAssistedDeaths;
            GrenadeSelfAssistedDeaths -= subtrahend.GrenadeSelfAssistedDeaths;

            VehiclesDestroyed -= subtrahend.VehiclesDestroyed;
            VehiclesLost      -= subtrahend.VehiclesLost;

            InterceptorsDestroyed -= subtrahend.InterceptorsDestroyed;
            InterceptorsLost      -= subtrahend.InterceptorsLost;
            EsfsDestroyed         -= subtrahend.EsfsDestroyed;
            EsfsLost            -= subtrahend.EsfsLost;
            ValkyriesDestroyed  -= subtrahend.ValkyriesDestroyed;
            ValkyriesLost       -= subtrahend.ValkyriesLost;
            LiberatorsDestroyed -= subtrahend.LiberatorsDestroyed;
            LiberatorsLost      -= subtrahend.LiberatorsLost;
            GalaxiesDestroyed   -= subtrahend.GalaxiesDestroyed;
            GalaxiesLost        -= subtrahend.GalaxiesLost;
            BastionsDestroyed   -= subtrahend.BastionsDestroyed;
            BastionsLost        -= subtrahend.BastionsLost;

            FlashesDestroyed    -= subtrahend.FlashesDestroyed;
            FlashesLost         -= subtrahend.FlashesLost;
            HarassersDestroyed  -= subtrahend.HarassersDestroyed;
            HarassersLost       -= subtrahend.HarassersLost;
            AntsDestroyed       -= subtrahend.AntsDestroyed;
            AntsLost            -= subtrahend.AntsLost;
            SunderersDestroyed  -= subtrahend.SunderersDestroyed;
            SunderersLost       -= subtrahend.SunderersLost;
            LightningsDestroyed -= subtrahend.LightningsDestroyed;
            LightningsLost      -= subtrahend.LightningsLost;
            MbtsDestroyed       -= subtrahend.MbtsDestroyed;
            MbtsLost            -= subtrahend.MbtsLost;

            ObjectiveCaptureTicks -= subtrahend.ObjectiveCaptureTicks;
            ObjectiveDefenseTicks -= subtrahend.ObjectiveDefenseTicks;
            BaseCaptures          -= subtrahend.BaseCaptures;
            BaseDefenses          -= subtrahend.BaseDefenses;

            if (BaseControlVictories == 0)
            {
                PreviousScoredBaseControlType = FacilityControlType.Unknown;
            }
            else if (subtrahend.BaseCaptures != 0 || subtrahend.BaseDefenses != 0)
            {
                // Base Defenses, if there are any, always occur before Base Captures within a round
                if (BaseDefenses > BaseCaptures)
                {
                    PreviousScoredBaseControlType = FacilityControlType.Defense;
                }
                else if (BaseCaptures >= BaseDefenses)
                {
                    PreviousScoredBaseControlType = FacilityControlType.Capture;
                }
            }

            if (subtrahend.PointAdjustments.Count > 0)
            {
                PointAdjustments.RemoveAll(pa => subtrahend.PointAdjustments.Contains(pa));
            }

            return(this);
        }
Ejemplo n.º 2
0
 public void SubtractStatsUpdate(ScrimEventAggregate update)
 {
     EventAggregateTracker.SubtractFromCurrent(update);
 }
        public ScrimEventAggregate Add(ScrimEventAggregate addend)
        {
            Points   += addend.Points;
            NetScore += addend.NetScore;

            FirstCaptures      += addend.FirstCaptures;
            SubsequentCaptures += addend.SubsequentCaptures;

            FirstCapturePoints      += addend.FirstCapturePoints;
            SubsequentCapturePoints += addend.SubsequentCapturePoints;

            Kills          += addend.Kills;
            Deaths         += addend.Deaths;
            Headshots      += addend.Headshots;
            HeadshotDeaths += addend.HeadshotDeaths;
            Suicides       += addend.Suicides;
            Teamkills      += addend.Teamkills;
            TeamkillDeaths += addend.TeamkillDeaths;
            RevivesGiven   += addend.RevivesGiven;
            RevivesTaken   += addend.RevivesTaken;
            DamageAssists  += addend.DamageAssists;
            //UtilityAssists += addend.UtilityAssists;
            GrenadeAssists       += addend.GrenadeAssists;
            SpotAssists          += addend.SpotAssists;
            HealSupportAssists   += addend.HealSupportAssists;
            ProtectAlliesAssists += addend.ProtectAlliesAssists;

            DamageAssistedDeaths += addend.DamageAssistedDeaths;
            //UtilityAssistedDeaths += addend.UtilityAssistedDeaths;
            GrenadeAssistedDeaths       += addend.GrenadeAssistedDeaths;
            SpotAssistedDeaths          += addend.SpotAssistedDeaths;
            ProtectAlliesAssistedDeaths += addend.ProtectAlliesAssistedDeaths;

            DamageTeamAssists         += addend.DamageTeamAssists;
            DamageSelfAssists         += addend.DamageSelfAssists;
            GrenadeTeamAssists        += addend.GrenadeTeamAssists;
            GrenadeSelfAssists        += addend.GrenadeSelfAssists;
            DamageTeamAssistedDeaths  += addend.DamageTeamAssistedDeaths;
            DamageSelfAssistedDeaths  += addend.DamageSelfAssistedDeaths;
            GrenadeTeamAssistedDeaths += addend.GrenadeTeamAssistedDeaths;
            GrenadeSelfAssistedDeaths += addend.GrenadeSelfAssistedDeaths;

            VehiclesDestroyed += addend.VehiclesDestroyed;
            VehiclesLost      += addend.VehiclesLost;

            InterceptorsDestroyed += addend.InterceptorsDestroyed;
            InterceptorsLost      += addend.InterceptorsLost;
            EsfsDestroyed         += addend.EsfsDestroyed;
            EsfsLost            += addend.EsfsLost;
            ValkyriesDestroyed  += addend.ValkyriesDestroyed;
            ValkyriesLost       += addend.ValkyriesLost;
            LiberatorsDestroyed += addend.LiberatorsDestroyed;
            LiberatorsLost      += addend.LiberatorsLost;
            GalaxiesDestroyed   += addend.GalaxiesDestroyed;
            GalaxiesLost        += addend.GalaxiesLost;
            BastionsDestroyed   += addend.BastionsDestroyed;
            BastionsLost        += addend.BastionsLost;

            FlashesDestroyed    += addend.FlashesDestroyed;
            FlashesLost         += addend.FlashesLost;
            HarassersDestroyed  += addend.HarassersDestroyed;
            HarassersLost       += addend.HarassersLost;
            AntsDestroyed       += addend.AntsDestroyed;
            AntsLost            += addend.AntsLost;
            SunderersDestroyed  += addend.SunderersDestroyed;
            SunderersLost       += addend.SunderersLost;
            LightningsDestroyed += addend.LightningsDestroyed;
            LightningsLost      += addend.LightningsLost;
            MbtsDestroyed       += addend.MbtsDestroyed;
            MbtsLost            += addend.MbtsLost;

            ObjectiveCaptureTicks += addend.ObjectiveCaptureTicks;
            ObjectiveDefenseTicks += addend.ObjectiveDefenseTicks;
            BaseCaptures          += addend.BaseCaptures;
            BaseDefenses          += addend.BaseDefenses;

            if (addend.BaseCaptures > 0 && addend.BaseDefenses == 0)
            {
                PreviousScoredBaseControlType = FacilityControlType.Capture;
            }
            else if (addend.BaseDefenses > 0 && addend.BaseCaptures == 0)
            {
                PreviousScoredBaseControlType = FacilityControlType.Defense;
            }

            if (addend.PointAdjustments.Count > 0)
            {
                PointAdjustments.AddRange(addend.PointAdjustments.Where(pa => !PointAdjustments.Contains(pa)).ToList());
            }

            return(this);
        }
Ejemplo n.º 4
0
 public void AddStatsUpdate(ScrimEventAggregate update)
 {
     EventAggregateTracker.AddToCurrent(update);
 }