Ejemplo n.º 1
0
        private void UpdateStats(PlayerStats stats, ConcurrentDictionary <string, ConcurrentDictionary <string, TimeRange> > calc,
                                 ConcurrentDictionary <string, ConcurrentDictionary <string, TimeRange> > secondary)
        {
            if (calc.TryGetValue(stats.Name, out ConcurrentDictionary <string, TimeRange> ranges))
            {
                // base the total time range off the sub times ranges since healing doesn't have good Fight segments to work with
                var totalRange = new TimeRange();
                ranges.Values.ToList().ForEach(range => totalRange.Add(range.TimeSegments));
                stats.TotalSeconds = totalRange.GetTotal();
            }

            StatsUtil.UpdateSubStatsTimeRanges(stats, calc);
            StatsUtil.UpdateSubStatsTimeRanges(stats, secondary);
            StatsUtil.UpdateCalculations(stats, RaidTotals);
        }