Exemplo n.º 1
0
 private void CheckUpdate(SkillResult skillResult)
 {
     if (PartyOnly &&//check if party only
         !(_playerTracker.MyParty(skillResult.SourcePlayer) || _playerTracker.MyParty(skillResult.TargetPlayer)))
     {
         return;
     }
     if (IsInactiveTimerReached() && skillResult.IsValid())
     {
         CasualMessenger.Instance.ResetPlayerStats(AutosaveEncounters || DamageTracker.IsArchived);
     }
     if (!DamageTracker.IsArchived && skillResult.IsValid(DamageTracker?.FirstAttack)) //don't process while viewing a past encounter
     {
         DamageTracker.Update(skillResult);
         if (!skillResult.IsHeal && skillResult.Amount > 0)
         {
             _inactivityTimer.Restart();
         }
         PlayerCount = DamageTracker.StatsByUser.Count;
     }
 }
Exemplo n.º 2
0
 private void CheckUpdate(SkillResult skillResult)
 {
     if (PartyOnly && !(_playerTracker.MyParty(skillResult.SourcePlayer) || _playerTracker.MyParty(skillResult.TargetPlayer)))
     {
         return;
     }
     if (SettingsHelper.Instance.Settings.InactivityResetDuration > 0 &&
         _inactivityTimer.Elapsed > TimeSpan.FromSeconds(SettingsHelper.Instance.Settings.InactivityResetDuration) &&
         skillResult.IsValid())
     {
         CasualMessenger.Instance.ResetPlayerStats(AutosaveEncounters || DamageTracker.IsArchived);
     }
     if (!DamageTracker.IsArchived && skillResult.IsValid(DamageTracker?.FirstAttack)) //don't process while viewing a past encounter
     {
         DamageTracker.Update(skillResult);
         if (!skillResult.IsHeal && skillResult.Amount > 0)
         {
             _inactivityTimer.Restart();
         }
         PlayerCount = DamageTracker.StatsByUser.Count;
     }
 }