Example #1
0
 public void CombineStats(PersistedStats StatsToBeMerged)
 {
     TotalDeaths.CombineStats(StatsToBeMerged.TotalDeaths);
     TotalPlayerKills.CombineStats(StatsToBeMerged.TotalPlayerKills);
     TotalPlayerAssists.CombineStats(StatsToBeMerged.TotalPlayerAssists);
     TotalPlayerDamage.CombineStats(StatsToBeMerged.TotalPlayerDamage);
     TotalPlayerHealing.CombineStats(StatsToBeMerged.TotalPlayerHealing);
     TotalPlayerAbsorb.CombineStats(StatsToBeMerged.TotalPlayerAbsorb);
     TotalPlayerDamageReceived.CombineStats(StatsToBeMerged.TotalPlayerDamageReceived);
     TotalBadgePoints.CombineStats(StatsToBeMerged.TotalBadgePoints);
     NetDamageAvoidedByEvades.CombineStats(StatsToBeMerged.NetDamageAvoidedByEvades);
     NetDamageAvoidedByEvadesPerLife.CombineStats(StatsToBeMerged.NetDamageAvoidedByEvadesPerLife);
     DamageDodgedByEvades.CombineStats(StatsToBeMerged.DamageDodgedByEvades);
     DamageInterceptedByEvades.CombineStats(StatsToBeMerged.DamageInterceptedByEvades);
     MyIncomingDamageReducedByCover.CombineStats(StatsToBeMerged.MyIncomingDamageReducedByCover);
     MyIncomingDamageReducedByCoverPerLife.CombineStats(StatsToBeMerged
                                                        .MyIncomingDamageReducedByCoverPerLife);
     MyOutgoingDamageReducedByCover.CombineStats(StatsToBeMerged.MyOutgoingDamageReducedByCover);
     MyOutgoingExtraDamageFromEmpowered.CombineStats(StatsToBeMerged.MyOutgoingExtraDamageFromEmpowered);
     MyOutgoingDamageReducedFromWeakened.CombineStats(StatsToBeMerged.MyOutgoingDamageReducedFromWeakened);
     TeamOutgoingDamageIncreasedByEmpoweredFromMe.CombineStats(StatsToBeMerged
                                                               .TeamOutgoingDamageIncreasedByEmpoweredFromMe);
     TeamIncomingDamageReducedByWeakenedFromMe.CombineStats(StatsToBeMerged
                                                            .TeamIncomingDamageReducedByWeakenedFromMe);
     MovementDeniedByMePerTurn.CombineStats(StatsToBeMerged.MovementDeniedByMePerTurn);
     EnergyGainPerTurn.CombineStats(StatsToBeMerged.EnergyGainPerTurn);
     DamagePerTurn.CombineStats(StatsToBeMerged.DamagePerTurn);
     BoostedOutgoingDamagePerTurn.CombineStats(StatsToBeMerged.BoostedOutgoingDamagePerTurn);
     DamageEfficiency.CombineStats(StatsToBeMerged.DamageEfficiency);
     KillParticipation.CombineStats(StatsToBeMerged.KillParticipation);
     EffectiveHealing.CombineStats(StatsToBeMerged.EffectiveHealing);
     TeamDamageAdjustedByMe.CombineStats(StatsToBeMerged.TeamDamageAdjustedByMe);
     TeamDamageSwingByMePerTurn.CombineStats(StatsToBeMerged.TeamDamageSwingByMePerTurn);
     TeamExtraEnergyByEnergizedFromMe.CombineStats(StatsToBeMerged.TeamExtraEnergyByEnergizedFromMe);
     TeamBoostedEnergyByMePerTurn.CombineStats(StatsToBeMerged.TeamBoostedEnergyByMePerTurn);
     TeamDamageReceived.CombineStats(StatsToBeMerged.TeamDamageReceived);
     DamageTakenPerLife.CombineStats(StatsToBeMerged.DamageTakenPerLife);
     EnemiesSightedPerTurn.CombineStats(StatsToBeMerged.EnemiesSightedPerTurn);
     TotalTurns.CombineStats(StatsToBeMerged.TotalTurns);
     TankingPerLife.CombineStats(StatsToBeMerged.TankingPerLife);
     TeamMitigation.CombineStats(StatsToBeMerged.TeamMitigation);
     SupportPerTurn.CombineStats(StatsToBeMerged.SupportPerTurn);
     DamageDonePerLife.CombineStats(StatsToBeMerged.DamageDonePerLife);
     DamageTakenPerTurn.CombineStats(StatsToBeMerged.DamageTakenPerTurn);
     SecondsPlayed.CombineStats(StatsToBeMerged.SecondsPlayed);
     MatchesWon.CombineStats(StatsToBeMerged.MatchesWon);
     for (int i = 0; i < FreelancerSpecificStats.Count; i++)
     {
         if (i < StatsToBeMerged.FreelancerSpecificStats.Count)
         {
             FreelancerSpecificStats[i].CombineStats(StatsToBeMerged.FreelancerSpecificStats[i]);
         }
     }
 }
Example #2
0
        public object Clone()
        {
            PersistedStats persistedStats = new PersistedStats();

            persistedStats.TotalDeaths                               = TotalDeaths.GetCopy();
            persistedStats.TotalPlayerKills                          = TotalPlayerKills.GetCopy();
            persistedStats.TotalPlayerAssists                        = TotalPlayerAssists.GetCopy();
            persistedStats.TotalPlayerDamage                         = TotalPlayerDamage.GetCopy();
            persistedStats.TotalPlayerHealing                        = TotalPlayerHealing.GetCopy();
            persistedStats.TotalPlayerAbsorb                         = TotalPlayerAbsorb.GetCopy();
            persistedStats.TotalPlayerDamageReceived                 = TotalPlayerDamageReceived.GetCopy();
            persistedStats.TotalBadgePoints                          = TotalBadgePoints.GetCopy();
            persistedStats.NetDamageAvoidedByEvades                  = NetDamageAvoidedByEvades.GetCopy();
            persistedStats.NetDamageAvoidedByEvadesPerLife           = NetDamageAvoidedByEvadesPerLife.GetCopy();
            persistedStats.DamageDodgedByEvades                      = DamageDodgedByEvades.GetCopy();
            persistedStats.DamageInterceptedByEvades                 = DamageInterceptedByEvades.GetCopy();
            persistedStats.MyIncomingDamageReducedByCover            = MyIncomingDamageReducedByCover.GetCopy();
            persistedStats.MyIncomingDamageReducedByCoverPerLife     = MyIncomingDamageReducedByCoverPerLife.GetCopy();
            persistedStats.MyOutgoingDamageReducedByCover            = MyOutgoingDamageReducedByCover.GetCopy();
            persistedStats.MyOutgoingDamageReducedFromWeakened       = MyOutgoingDamageReducedFromWeakened.GetCopy();
            persistedStats.MyOutgoingExtraDamageFromEmpowered        = MyOutgoingExtraDamageFromEmpowered.GetCopy();
            persistedStats.TeamIncomingDamageReducedByWeakenedFromMe =
                TeamIncomingDamageReducedByWeakenedFromMe.GetCopy();
            persistedStats.TeamOutgoingDamageIncreasedByEmpoweredFromMe =
                TeamOutgoingDamageIncreasedByEmpoweredFromMe.GetCopy();
            persistedStats.MovementDeniedByMePerTurn        = MovementDeniedByMePerTurn.GetCopy();
            persistedStats.EnergyGainPerTurn                = EnergyGainPerTurn.GetCopy();
            persistedStats.DamagePerTurn                    = DamagePerTurn.GetCopy();
            persistedStats.BoostedOutgoingDamagePerTurn     = BoostedOutgoingDamagePerTurn.GetCopy();
            persistedStats.DamageEfficiency                 = DamageEfficiency.GetCopy();
            persistedStats.KillParticipation                = KillParticipation.GetCopy();
            persistedStats.EffectiveHealing                 = EffectiveHealing.GetCopy();
            persistedStats.TeamDamageAdjustedByMe           = TeamDamageAdjustedByMe.GetCopy();
            persistedStats.TeamDamageSwingByMePerTurn       = TeamDamageSwingByMePerTurn.GetCopy();
            persistedStats.TeamExtraEnergyByEnergizedFromMe = TeamExtraEnergyByEnergizedFromMe.GetCopy();
            persistedStats.TeamBoostedEnergyByMePerTurn     = TeamBoostedEnergyByMePerTurn.GetCopy();
            persistedStats.TeamDamageReceived               = TeamDamageReceived.GetCopy();
            persistedStats.DamageTakenPerLife               = DamageTakenPerLife.GetCopy();
            persistedStats.EnemiesSightedPerTurn            = EnemiesSightedPerTurn.GetCopy();
            persistedStats.TotalTurns         = TotalTurns.GetCopy();
            persistedStats.TankingPerLife     = TankingPerLife.GetCopy();
            persistedStats.TeamMitigation     = TeamMitigation.GetCopy();
            persistedStats.SupportPerTurn     = SupportPerTurn.GetCopy();
            persistedStats.DamageDonePerLife  = DamageDonePerLife.GetCopy();
            persistedStats.DamageTakenPerTurn = DamageTakenPerTurn.GetCopy();
            persistedStats.SecondsPlayed      = SecondsPlayed.GetCopy();
            persistedStats.MatchesWon         = MatchesWon.GetCopy();
            if (FreelancerSpecificStats == null)
            {
                persistedStats.FreelancerSpecificStats = null;
            }
            else
            {
                persistedStats.FreelancerSpecificStats = new List <PersistedStatEntry>();
                for (int i = 0; i < FreelancerSpecificStats.Count; i++)
                {
                    PersistedStatEntry item = new PersistedStatEntry();
                    item = (PersistedStatEntry)FreelancerSpecificStats[i].Clone();
                    persistedStats.FreelancerSpecificStats.Add(item);
                }
            }

            return(persistedStats);
        }