Пример #1
0
        internal FinalDPS(ParsedEvtcLog log, PhaseData phase, AbstractSingleActor actor, AbstractSingleActor target)
        {
            double phaseDuration = (phase.DurationInMS) / 1000.0;
            int    damage;
            double dps = 0.0;
            List <AbstractDamageEvent> damageLogs = actor.GetDamageLogs(target, log, phase.Start, phase.End);

            //DPS
            damage = damageLogs.Sum(x => x.Damage);

            if (phaseDuration > 0)
            {
                dps = damage / phaseDuration;
            }
            Dps    = (int)Math.Round(dps);
            Damage = damage;
            //Condi DPS
            damage = damageLogs.Sum(x => x.IsCondi(log) ? x.Damage : 0);

            if (phaseDuration > 0)
            {
                dps = damage / phaseDuration;
            }
            CondiDps    = (int)Math.Round(dps);
            CondiDamage = damage;
            //Power DPS
            damage = Damage - CondiDamage;
            if (phaseDuration > 0)
            {
                dps = damage / phaseDuration;
            }
            PowerDps    = (int)Math.Round(dps);
            PowerDamage = damage;
            List <AbstractDamageEvent> actorDamageLogs = actor.GetJustActorDamageLogs(target, log, phase.Start, phase.End);

            // Actor DPS
            damage = actorDamageLogs.Sum(x => x.Damage);

            if (phaseDuration > 0)
            {
                dps = damage / phaseDuration;
            }
            ActorDps    = (int)Math.Round(dps);
            ActorDamage = damage;
            //Actor Condi DPS
            damage = actorDamageLogs.Sum(x => x.IsCondi(log) ? x.Damage : 0);

            if (phaseDuration > 0)
            {
                dps = damage / phaseDuration;
            }
            ActorCondiDps    = (int)Math.Round(dps);
            ActorCondiDamage = damage;
            //Actor Power DPS
            damage = ActorDamage - ActorCondiDamage;
            if (phaseDuration > 0)
            {
                dps = damage / phaseDuration;
            }
            ActorPowerDps    = (int)Math.Round(dps);
            ActorPowerDamage = damage;
        }
        internal FinalGameplayStats(ParsedEvtcLog log, PhaseData phase, AbstractSingleActor actor, AbstractSingleActor target)
        {
            List <AbstractDamageEvent> dls = actor.GetJustActorDamageLogs(target, log, phase.Start, phase.End);

            foreach (AbstractDamageEvent dl in dls)
            {
                if (!(dl is NonDirectDamageEvent))
                {
                    if (dl.HasHit)
                    {
                        if (SkillItem.CanCrit(dl.SkillId, log.LogData.GW2Build))
                        {
                            if (dl.HasCrit)
                            {
                                CriticalCount++;
                                CriticalDmg += dl.Damage;
                            }
                            CritableDirectDamageCount++;
                        }
                        if (dl.IsFlanking)
                        {
                            FlankingCount++;
                        }

                        if (dl.HasGlanced)
                        {
                            GlanceCount++;
                        }
                        ConnectedDirectDamageCount++;
                    }

                    if (dl.HasInterrupted)
                    {
                        Interrupts++;
                    }

                    if (dl.IsBlind)
                    {
                        Missed++;
                    }
                    if (dl.IsEvaded)
                    {
                        Evaded++;
                    }
                    if (dl.IsBlocked)
                    {
                        Blocked++;
                    }
                    if (!dl.DoubleProcHit)
                    {
                        DirectDamageCount++;
                    }
                }
                if (dl.IsAbsorbed)
                {
                    Invulned++;
                }
                if (!dl.DoubleProcHit)
                {
                    TotalDamageCount++;
                }
            }
        }