예제 #1
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);
        }