internal FinalGameplayStats(ParsedEvtcLog log, long start, long end, AbstractSingleActor actor)
        {
            // If dummy actor, stop
            if (actor.IsFakeActor)
            {
                return;
            }
            long duration = end - start;

            foreach (AbstractCastEvent cl in actor.GetCastEvents(log, start, end))
            {
                switch (cl.Status)
                {
                case AbstractCastEvent.AnimationStatus.Interrupted:
                    Wasted++;
                    TimeWasted += cl.SavedDuration;
                    break;

                case AbstractCastEvent.AnimationStatus.Reduced:
                    Saved++;
                    TimeSaved += cl.SavedDuration;
                    break;
                }
                if (cl.Skill.IsSwap)
                {
                    SwapCount++;
                }
            }
            TimeSaved  = Math.Round(TimeSaved / 1000.0, ParserHelper.TimeDigit);
            TimeWasted = -Math.Round(TimeWasted / 1000.0, ParserHelper.TimeDigit);
            //
            foreach (AbstractCastEvent cl in actor.GetIntersectingCastEvents(log, start, end))
            {
                if (cl.Status == AbstractCastEvent.AnimationStatus.Interrupted || cl.Status == AbstractCastEvent.AnimationStatus.Unknown)
                {
                    continue;
                }
                long value = Math.Min(cl.EndTime, end) - Math.Max(cl.Time, start);
                SkillCastUptime += value;
                if (!cl.Skill.AA)
                {
                    SkillCastUptimeNoAA += value;
                }
            }
            long timeInCombat = Math.Max(actor.GetTimeSpentInCombat(log, start, end), 1);

            SkillCastUptime     /= timeInCombat;
            SkillCastUptimeNoAA /= timeInCombat;
            SkillCastUptime      = Math.Round(100.0 * SkillCastUptime, ParserHelper.TimeDigit);
            SkillCastUptimeNoAA  = Math.Round(100.0 * SkillCastUptimeNoAA, ParserHelper.TimeDigit);
            //
            double avgBoons = 0;

            foreach (long boonDuration in actor.GetBuffPresence(log, start, end).Where(x => log.Buffs.BuffsByIds[x.Key].Classification == BuffClassification.Boon).Select(x => x.Value))
            {
                avgBoons += boonDuration;
            }
            AvgBoons = Math.Round(avgBoons / duration, ParserHelper.BuffDigit);
            long activeDuration = actor.GetActiveDuration(log, start, end);

            AvgActiveBoons = activeDuration > 0 ? Math.Round(avgBoons / activeDuration, ParserHelper.BuffDigit) : 0.0;
            //
            double avgCondis = 0;

            foreach (long conditionDuration in actor.GetBuffPresence(log, start, end).Where(x => log.Buffs.BuffsByIds[x.Key].Classification == BuffClassification.Condition).Select(x => x.Value))
            {
                avgCondis += conditionDuration;
            }
            AvgConditions       = Math.Round(avgCondis / duration, ParserHelper.BuffDigit);
            AvgActiveConditions = activeDuration > 0 ? Math.Round(avgCondis / activeDuration, ParserHelper.BuffDigit) : 0.0;
            //
            if (log.CombatData.HasMovementData && log.FriendlyAgents.Contains(actor.AgentItem) && actor.GetCombatReplayPolledPositions(log).Any(x => x.X > int.MinValue + 1))
            {
                StackDist = GetDistanceToTarget(actor, log, start, end, log.StatisticsHelper.GetStackCenterPositions(log));
                DistToCom = GetDistanceToTarget(actor, log, start, end, log.StatisticsHelper.GetStackCommanderPositions(log));
            }
        }