CasualMeter.ShellViewModel.ResetDamageTracker C# (CSharp) Méthode

ResetDamageTracker() private méthode

private ResetDamageTracker ( CasualMeter.Common.Conductors.Messages.ResetPlayerStatsMessage message = null ) : void
message CasualMeter.Common.Conductors.Messages.ResetPlayerStatsMessage
Résultat void
        private void ResetDamageTracker(ResetPlayerStatsMessage message = null)
        {
            if (Server == null) return;

            var saveEncounter = message != null && message.ShouldSaveCurrent;
            if (saveEncounter && !DamageTracker.IsArchived && DamageTracker.StatsByUser.Count > 0 &&
                DamageTracker.FirstAttack != null && DamageTracker.LastAttack != null)
            {
                DamageTracker.IsArchived = true;
                DamageTracker.Abnormals = _abnormalityStorage.Clone();
                ArchivedDamageTrackers.Add(DamageTracker);
                return;
            }
            if (message != null && !message.ShouldSaveCurrent && DamageTracker.IsArchived)
            {
                ArchivedDamageTrackers.Remove(DamageTracker);
            }

            _abnormalityStorage.ClearEnded();
            DamageTracker = new DamageTracker
            {
                OnlyBosses = OnlyBosses,
                IgnoreOneshots = IgnoreOneshots,
                Abnormals = _abnormalityStorage
            };
        }