public void CombineStats(PersistedStatEntry entry) { Sum += entry.Sum; NumGamesInSum += entry.NumGamesInSum; Max = Math.Max(Max, entry.Max); Min = Math.Min(Min, entry.Min); }
public PersistedStats() { TotalDeaths = new PersistedStatEntry(); TotalPlayerKills = new PersistedStatEntry(); TotalPlayerAssists = new PersistedStatEntry(); TotalPlayerDamage = new PersistedStatEntry(); TotalPlayerHealing = new PersistedStatEntry(); TotalPlayerAbsorb = new PersistedStatEntry(); TotalPlayerDamageReceived = new PersistedStatEntry(); TotalBadgePoints = new PersistedStatFloatEntry(); NetDamageAvoidedByEvades = new PersistedStatEntry(); NetDamageAvoidedByEvadesPerLife = new PersistedStatFloatEntry(); DamageDodgedByEvades = new PersistedStatEntry(); DamageInterceptedByEvades = new PersistedStatEntry(); MyIncomingDamageReducedByCover = new PersistedStatEntry(); MyIncomingDamageReducedByCoverPerLife = new PersistedStatFloatEntry(); MyOutgoingDamageReducedByCover = new PersistedStatEntry(); MyOutgoingExtraDamageFromEmpowered = new PersistedStatEntry(); MyOutgoingDamageReducedFromWeakened = new PersistedStatEntry(); TeamOutgoingDamageIncreasedByEmpoweredFromMe = new PersistedStatEntry(); TeamIncomingDamageReducedByWeakenedFromMe = new PersistedStatEntry(); MovementDeniedByMePerTurn = new PersistedStatFloatEntry(); EnergyGainPerTurn = new PersistedStatFloatEntry(); DamagePerTurn = new PersistedStatFloatEntry(); BoostedOutgoingDamagePerTurn = new PersistedStatFloatEntry(); DamageEfficiency = new PersistedStatFloatEntry(); KillParticipation = new PersistedStatFloatEntry(); EffectiveHealing = new PersistedStatEntry(); TeamDamageAdjustedByMe = new PersistedStatEntry(); TeamDamageSwingByMePerTurn = new PersistedStatFloatEntry(); TeamExtraEnergyByEnergizedFromMe = new PersistedStatEntry(); TeamBoostedEnergyByMePerTurn = new PersistedStatFloatEntry(); TeamDamageReceived = new PersistedStatEntry(); DamageTakenPerLife = new PersistedStatFloatEntry(); EnemiesSightedPerTurn = new PersistedStatFloatEntry(); TotalTurns = new PersistedStatFloatEntry(); TankingPerLife = new PersistedStatFloatEntry(); TeamMitigation = new PersistedStatFloatEntry(); SupportPerTurn = new PersistedStatFloatEntry(); DamageDonePerLife = new PersistedStatFloatEntry(); DamageTakenPerTurn = new PersistedStatFloatEntry(); AvgLifeSpan = new PersistedStatFloatEntry(); SecondsPlayed = new PersistedStatFloatEntry(); MatchesWon = new PersistedStatEntry(); FreelancerSpecificStats = new List <PersistedStatEntry>(); }
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); }