示例#1
0
        public override void ComputeMobCombatReplayActors(Mob mob, ParsedLog log, CombatReplay replay)
        {
            int start = (int)replay.TimeOffsets.start;
            int end   = (int)replay.TimeOffsets.end;

            switch (mob.ID)
            {
            case (ushort)Saul:
            case (ushort)GamblerClones:
            case (ushort)GamblerReal:
            case (ushort)Greed:
            case (ushort)Pride:
            case (ushort)Tear:
                break;

            case (ushort)Hands:
                replay.Actors.Add(new CircleActor(true, 0, 90, (start, end), "rgba(255, 0, 0, 0.2)", new AgentConnector(mob)));
                break;

            case (ushort)Oil:
                int delay = 3000;
                replay.Actors.Add(new CircleActor(true, start + delay, 200, (start, start + delay), "rgba(255,100, 0, 0.5)", new AgentConnector(mob)));
                replay.Actors.Add(new CircleActor(true, 0, 200, (start + delay, end), "rgba(0, 0, 0, 0.5)", new AgentConnector(mob)));
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
        public override void ComputeAdditionalTrashMobData(Mob mob, ParsedLog log)
        {
            CombatReplay replay = mob.CombatReplay;
            int          start  = (int)replay.TimeOffsets.start;
            int          end    = (int)replay.TimeOffsets.end;

            switch (mob.ID)
            {
            case (ushort)Core:
                break;

            case (ushort)Jessica:
            case (ushort)Olson:
            case (ushort)Engul:
            case (ushort)Faerla:
            case (ushort)Caulle:
            case (ushort)Henley:
            case (ushort)Galletta:
            case (ushort)Ianim:
                Target mainTarget = Targets.Find(x => x.ID == (ushort)ParseEnum.TargetIDS.KeepConstruct);
                if (mainTarget == null)
                {
                    throw new InvalidOperationException("Main target of the fight not found");
                }
                CombatReplay mtCR = mainTarget.CombatReplay;
                replay.Actors.Add(new CircleActor(false, 0, 600, (start, end), "rgba(255, 0, 0, 0.5)", new AgentConnector(mob)));
                replay.Actors.Add(new CircleActor(true, 0, 400, (start, end), "rgba(0, 125, 255, 0.5)", new AgentConnector(mob)));
                Point3D pos = replay.Positions.FirstOrDefault();
                if (pos != null)
                {
                    mtCR.Actors.Add(new CircleActor(true, 0, 300, (start - 5000, start), "rgba(220, 50, 0, 0.5)", new PositionConnector(pos)));
                    mtCR.Actors.Add(new CircleActor(true, start, 300, (start - 5000, start), "rgba(220, 50, 0, 0.5)", new PositionConnector(pos)));
                }
                break;

            case (ushort)GreenPhantasm:
                int lifetime = 8000;
                replay.Actors.Add(new CircleActor(true, 0, 210, (start, start + lifetime), "rgba(0,255,0,0.2)", new AgentConnector(mob)));
                replay.Actors.Add(new CircleActor(true, start + lifetime, 210, (start, start + lifetime), "rgba(0,255,0,0.3)", new AgentConnector(mob)));
                break;

            case (ushort)RetrieverProjection:
            case (ushort)InsidiousProjection:
            case (ushort)UnstableLeyRift:
            case (ushort)RadiantPhantasm:
            case (ushort)CrimsonPhantasm:
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
示例#3
0
        public override void ComputeAdditionalTargetData(Target target, ParsedLog log)
        {
            CombatReplay   replay = target.CombatReplay;
            List <CastLog> cls    = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.Slothasor:
                List <CastLog> sleepy = cls.Where(x => x.SkillId == 34515).ToList();
                foreach (CastLog c in sleepy)
                {
                    replay.Actors.Add(new CircleActor(true, 0, 180, ((int)c.Time, (int)c.Time + c.ActualDuration), "rgba(0, 180, 255, 0.3)", new AgentConnector(target)));
                }
                List <CastLog> breath = cls.Where(x => x.SkillId == 34516).ToList();
                foreach (CastLog c in breath)
                {
                    int     start       = (int)c.Time;
                    int     preCastTime = 1000;
                    int     duration    = 2000;
                    int     range       = 600;
                    Point3D facing      = replay.Rotations.LastOrDefault(x => x.Time <= start + 1000);
                    if (facing != null)
                    {
                        int direction = Point3D.GetRotationFromFacing(facing);
                        int angle     = 60;
                        replay.Actors.Add(new PieActor(true, 0, range, direction, angle, (start, start + preCastTime), "rgba(255,200,0,0.1)", new AgentConnector(target)));
                        replay.Actors.Add(new PieActor(true, 0, range, direction, angle, (start + preCastTime, start + preCastTime + duration), "rgba(255,200,0,0.4)", new AgentConnector(target)));
                    }
                }
                List <CastLog> tantrum = cls.Where(x => x.SkillId == 34547).ToList();
                foreach (CastLog c in tantrum)
                {
                    int start = (int)c.Time;
                    int end   = start + c.ActualDuration;
                    replay.Actors.Add(new CircleActor(false, 0, 300, (start, end), "rgba(255, 150, 0, 0.4)", new AgentConnector(target)));
                    replay.Actors.Add(new CircleActor(true, end, 300, (start, end), "rgba(255, 150, 0, 0.4)", new AgentConnector(target)));
                }
                List <CastLog> shakes = cls.Where(x => x.SkillId == 34482).ToList();
                foreach (CastLog c in shakes)
                {
                    int start = (int)c.Time;
                    int end   = start + c.ActualDuration;
                    replay.Actors.Add(new CircleActor(false, 0, 700, (start, end), "rgba(255, 0, 0, 0.4)", new AgentConnector(target)));
                    replay.Actors.Add(new CircleActor(true, end, 700, (start, end), "rgba(255, 0, 0, 0.4)", new AgentConnector(target)));
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
示例#4
0
        public override void ComputeTargetCombatReplayActors(Target target, ParsedLog log, CombatReplay replay)
        {
            List <CastLog> cls = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.Xera:
                List <CastLog> summon = cls.Where(x => x.SkillId == 34887).ToList();
                foreach (CastLog c in summon)
                {
                    replay.Actors.Add(new CircleActor(true, 0, 180, ((int)c.Time, (int)c.Time + c.ActualDuration), "rgba(0, 180, 255, 0.3)", new AgentConnector(target)));
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
        public override void ComputeAdditionalThrashMobData(Mob mob, ParsedLog log)
        {
            CombatReplay   replay = mob.CombatReplay;
            List <CastLog> cls    = mob.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (mob.ID)
            {
            case (ushort)Jade:
                List <CombatItem> shield = GetFilteredList(log, 38155, mob, true);
                int shieldStart          = 0;
                int shieldRadius         = 100;
                foreach (CombatItem c in shield)
                {
                    if (c.IsBuffRemove == ParseEnum.BuffRemove.None)
                    {
                        shieldStart = (int)(log.FightData.ToFightSpace(c.Time));
                    }
                    else
                    {
                        int shieldEnd = (int)(log.FightData.ToFightSpace(c.Time));
                        replay.Actors.Add(new CircleActor(true, 0, shieldRadius, (shieldStart, shieldEnd), "rgba(255, 200, 0, 0.3)", new AgentConnector(mob)));
                    }
                }
                List <CastLog> explosion = cls.Where(x => x.SkillId == 37788).ToList();
                foreach (CastLog c in explosion)
                {
                    int start    = (int)c.Time;
                    int precast  = 1350;
                    int duration = 100;
                    int radius   = 1200;
                    replay.Actors.Add(new CircleActor(true, 0, radius, (start, start + precast + duration), "rgba(255, 0, 0, 0.05)", new AgentConnector(mob)));
                    replay.Actors.Add(new CircleActor(true, 0, radius, (start + precast - 10, start + precast + duration), "rgba(255, 0, 0, 0.25)", new AgentConnector(mob)));
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
示例#6
0
        public override void ComputeMobCombatReplayActors(Mob mob, ParsedLog log, CombatReplay replay)
        {
            List <AbstractCastEvent> cls = mob.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (mob.ID)
            {
            case (ushort)Jade:
                List <AbstractBuffEvent> shield = GetFilteredList(log.CombatData, 38155, mob, true);
                int shieldStart  = 0;
                int shieldRadius = 100;
                foreach (AbstractBuffEvent c in shield)
                {
                    if (c is BuffApplyEvent)
                    {
                        shieldStart = (int)c.Time;
                    }
                    else
                    {
                        int shieldEnd = (int)c.Time;
                        replay.Actors.Add(new CircleActor(true, 0, shieldRadius, (shieldStart, shieldEnd), "rgba(255, 200, 0, 0.3)", new AgentConnector(mob)));
                    }
                }
                List <AbstractCastEvent> explosion = cls.Where(x => x.SkillId == 37788).ToList();
                foreach (AbstractCastEvent c in explosion)
                {
                    int start    = (int)c.Time;
                    int precast  = 1350;
                    int duration = 100;
                    int radius   = 1200;
                    replay.Actors.Add(new CircleActor(true, 0, radius, (start, start + precast + duration), "rgba(255, 0, 0, 0.05)", new AgentConnector(mob)));
                    replay.Actors.Add(new CircleActor(true, 0, radius, (start + precast - 10, start + precast + duration), "rgba(255, 0, 0, 0.25)", new AgentConnector(mob)));
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
        public override void ComputeAdditionalTargetData(Target target, ParsedLog log)
        {
            CombatReplay   replay = target.CombatReplay;
            List <CastLog> cls    = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.Matthias:
                List <CastLog> humanShield        = cls.Where(x => x.SkillId == 34468).ToList();
                List <int>     humanShieldRemoval = log.CombatData.GetBoonData(34518).Where(x => x.IsBuffRemove == ParseEnum.BuffRemove.All).Select(x => (int)(log.FightData.ToFightSpace(x.Time))).Distinct().ToList();
                for (var i = 0; i < humanShield.Count; i++)
                {
                    var shield = humanShield[i];
                    if (i < humanShieldRemoval.Count)
                    {
                        int removal = humanShieldRemoval[i];
                        replay.Actors.Add(new CircleActor(true, 0, 250, ((int)shield.Time, removal), "rgba(255, 0, 255, 0.5)", new AgentConnector(target)));
                    }
                    else
                    {
                        replay.Actors.Add(new CircleActor(true, 0, 250, ((int)shield.Time, (int)log.FightData.FightDuration), "rgba(255, 0, 255, 0.5)", new AgentConnector(target)));
                    }
                }
                List <CastLog> aboShield        = cls.Where(x => x.SkillId == 34510).ToList();
                List <int>     aboShieldRemoval = log.CombatData.GetBoonData(34376).Where(x => x.IsBuffRemove == ParseEnum.BuffRemove.All).Select(x => (int)(log.FightData.ToFightSpace(x.Time))).Distinct().ToList();
                for (var i = 0; i < aboShield.Count; i++)
                {
                    var shield = aboShield[i];
                    if (i < aboShieldRemoval.Count)
                    {
                        int removal = aboShieldRemoval[i];
                        replay.Actors.Add(new CircleActor(true, 0, 250, ((int)shield.Time, removal), "rgba(255, 0, 255, 0.5)", new AgentConnector(target)));
                    }
                    else
                    {
                        replay.Actors.Add(new CircleActor(true, 0, 250, ((int)shield.Time, (int)log.FightData.FightDuration), "rgba(255, 0, 255, 0.5)", new AgentConnector(target)));
                    }
                }
                List <CastLog> rageShards = cls.Where(x => x.SkillId == 34404 || x.SkillId == 34411).ToList();
                foreach (CastLog c in rageShards)
                {
                    int start = (int)c.Time;
                    int end   = start + c.ActualDuration;
                    replay.Actors.Add(new CircleActor(false, 0, 300, (start, end), "rgba(255, 0, 0, 0.5)", new AgentConnector(target)));
                    replay.Actors.Add(new CircleActor(true, end, 300, (start, end), "rgba(255, 0, 0, 0.5)", new AgentConnector(target)));
                }
                List <CastLog> hadouken = cls.Where(x => x.SkillId == 34371 || x.SkillId == 34380).ToList();
                foreach (CastLog c in hadouken)
                {
                    int     start = (int)c.Time;
                    int     preCastTime = 1000;
                    int     duration = 750;
                    int     width = 4000; int height = 130;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time <= start + 1000);
                    if (facing != null)
                    {
                        int direction = (int)(Math.Atan2(facing.Y, facing.X) * 180 / Math.PI);
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, direction, width / 2, (start, start + preCastTime), "rgba(255, 0, 0, 0.1)", new AgentConnector(target)));
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, direction, width / 2, (start + preCastTime, start + preCastTime + duration), "rgba(255, 0, 0, 0.7)", new AgentConnector(target)));
                    }
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
示例#8
0
        public override void ComputeAdditionalTargetData(Target target, ParsedLog log)
        {
            CombatReplay   replay = target.CombatReplay;
            List <CastLog> cls    = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            (int, int)lifespan = ((int)target.CombatReplay.TimeOffsets.start, (int)target.CombatReplay.TimeOffsets.end);
            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.ValeGuardian:
                List <CastLog> magicStorms = cls.Where(x => x.SkillId == 31419).ToList();
                foreach (CastLog c in magicStorms)
                {
                    replay.Actors.Add(new CircleActor(true, 0, 100, ((int)c.Time, (int)c.Time + c.ActualDuration), "rgba(0, 180, 255, 0.3)", new AgentConnector(target)));
                }
                int            distributedMagicDuration = 6700;
                int            arenaRadius           = 1600;
                int            impactDuration        = 110;
                List <CastLog> distributedMagicGreen = cls.Where(x => x.SkillId == 31750).ToList();
                foreach (CastLog c in distributedMagicGreen)
                {
                    int start = (int)c.Time;
                    int end   = start + distributedMagicDuration;
                    replay.Actors.Add(new PieActor(true, start + distributedMagicDuration, arenaRadius, 151, 120, (start, end), "rgba(0,255,0,0.1)", new PositionConnector(new Point3D(-4749.838867f, -20607.296875f, 0.0f, 0))));
                    replay.Actors.Add(new PieActor(true, 0, arenaRadius, 151, 120, (end, end + impactDuration), "rgba(0,255,0,0.3)", new PositionConnector(new Point3D(-4749.838867f, -20607.296875f, 0.0f, 0))));
                    replay.Actors.Add(new CircleActor(true, 0, 180, (start, end), "rgba(0,255,0,0.2)", new PositionConnector(new Point3D(-5449.0f, -20219.0f, 0.0f, 0))));
                }
                List <CastLog> distributedMagicBlue = cls.Where(x => x.SkillId == 31340).ToList();
                foreach (CastLog c in distributedMagicBlue)
                {
                    int start = (int)c.Time;
                    int end   = start + distributedMagicDuration;
                    replay.Actors.Add(new PieActor(true, start + distributedMagicDuration, arenaRadius, 31, 120, (start, end), "rgba(0,255,0,0.1)", new PositionConnector(new Point3D(-4749.838867f, -20607.296875f, 0.0f, 0))));
                    replay.Actors.Add(new PieActor(true, 0, arenaRadius, 31, 120, (end, end + impactDuration), "rgba(0,255,0,0.3)", new PositionConnector(new Point3D(-4749.838867f, -20607.296875f, 0.0f, 0))));
                    replay.Actors.Add(new CircleActor(true, 0, 180, (start, end), "rgba(0,255,0,0.2)", new PositionConnector(new Point3D(-4063.0f, -20195.0f, 0.0f, 0))));
                }
                List <CastLog> distributedMagicRed = cls.Where(x => x.SkillId == 31391).ToList();
                foreach (CastLog c in distributedMagicRed)
                {
                    int start = (int)c.Time;
                    int end   = start + distributedMagicDuration;
                    replay.Actors.Add(new PieActor(true, start + distributedMagicDuration, arenaRadius, 271, 120, (start, end), "rgba(0,255,0,0.1)", new PositionConnector(new Point3D(-4749.838867f, -20607.296875f, 0.0f, 0))));
                    replay.Actors.Add(new PieActor(true, 0, arenaRadius, 271, 120, (end, end + impactDuration), "rgba(0,255,0,0.3)", new PositionConnector(new Point3D(-4749.838867f, -20607.296875f, 0.0f, 0))));
                    replay.Actors.Add(new CircleActor(true, 0, 180, (start, end), "rgba(0,255,0,0.2)", new PositionConnector(new Point3D(-4735.0f, -21407.0f, 0.0f, 0))));
                }
                break;

            case (ushort)BlueGuardian:
                replay.Actors.Add(new CircleActor(false, 0, 1500, lifespan, "rgba(0, 0, 255, 0.5)", new AgentConnector(target)));
                break;

            case (ushort)GreenGuardian:
                replay.Actors.Add(new CircleActor(false, 0, 1500, lifespan, "rgba(0, 255, 0, 0.5)", new AgentConnector(target)));
                break;

            case (ushort)RedGuardian:
                replay.Actors.Add(new CircleActor(false, 0, 1500, lifespan, "rgba(255, 0, 0, 0.5)", new AgentConnector(target)));
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
        public override void ComputeAdditionalTargetData(Target target, ParsedLog log)
        {
            CombatReplay   replay = target.CombatReplay;
            List <CastLog> cls    = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.Gorseval:
                List <CastLog> blooms = cls.Where(x => x.SkillId == 31616).ToList();
                foreach (CastLog c in blooms)
                {
                    int start = (int)c.Time;
                    int end   = start + c.ActualDuration;
                    replay.Actors.Add(new CircleActor(true, c.ExpectedDuration + (int)c.Time, 600, (start, end), "rgba(255, 125, 0, 0.5)", new AgentConnector(target)));
                    replay.Actors.Add(new CircleActor(false, 0, 600, (start, end), "rgba(255, 125, 0, 0.5)", new AgentConnector(target)));
                }
                List <PhaseData> phases = log.FightData.GetPhases(log);
                if (phases.Count > 1)
                {
                    List <CastLog> rampage = cls.Where(x => x.SkillId == 31834).ToList();
                    Point3D        pos     = target.CombatReplay.Positions.First();
                    foreach (CastLog c in rampage)
                    {
                        int start = (int)c.Time;
                        int end   = start + c.ActualDuration;
                        replay.Actors.Add(new CircleActor(true, 0, 180, (start, end), "rgba(0, 125, 255, 0.3)", new AgentConnector(target)));
                        // or spawn -> 3 secs -> explosion -> 0.5 secs -> fade -> 0.5  secs-> next
                        int ticks = (int)Math.Min(Math.Ceiling(c.ActualDuration / 4000.0), 6);
                        int phaseIndex;
                        for (phaseIndex = 1; phaseIndex < phases.Count; phaseIndex++)
                        {
                            if (phases[phaseIndex].InInterval(start))
                            {
                                break;
                            }
                        }
                        if (pos == null)
                        {
                            break;
                        }
                        List <string> patterns;
                        switch (phaseIndex)
                        {
                        case 1:
                            patterns = new List <string>
                            {
                                "2+3+5",
                                "2+3+4",
                                "1+4+5",
                                "1+2+5",
                                "1+3+5",
                                "Full"
                            };
                            break;

                        case 3:
                            patterns = new List <string>
                            {
                                "2+3+4",
                                "1+4+5",
                                "1+3+4",
                                "1+2+5",
                                "1+2+3",
                                "Full"
                            };
                            break;

                        case 5:
                            patterns = new List <string>
                            {
                                "1+4+5",
                                "1+2+5",
                                "2+3+5",
                                "3+4+5",
                                "3+4+5",
                                "Full"
                            };
                            break;

                        default:
                            throw new Exception("how the f**k");
                        }
                        start += 2200;
                        for (int i = 0; i < ticks; i++)
                        {
                            int    tickStart = start + 4000 * i;
                            int    explosion = tickStart + 3000;
                            int    tickEnd   = tickStart + 3500;
                            string pattern   = patterns[i];
                            if (pattern.Contains("1"))
                            {
                                replay.Actors.Add(new CircleActor(true, explosion, 360, (tickStart, tickEnd), "rgba(25,25,112, 0.2)", new PositionConnector(pos)));
                                replay.Actors.Add(new CircleActor(true, 0, 360, (tickStart, tickEnd), "rgba(25,25,112, 0.4)", new PositionConnector(pos)));
                            }
                            if (pattern.Contains("2"))
                            {
                                replay.Actors.Add(new DoughnutActor(true, explosion, 360, 720, (tickStart, tickEnd), "rgba(25,25,112, 0.2)", new PositionConnector(pos)));
                                replay.Actors.Add(new DoughnutActor(true, 0, 360, 720, (tickStart, tickEnd), "rgba(25,25,112, 0.4)", new PositionConnector(pos)));
                            }
                            if (pattern.Contains("3"))
                            {
                                replay.Actors.Add(new DoughnutActor(true, explosion, 720, 1080, (tickStart, tickEnd), "rgba(25,25,112, 0.2)", new PositionConnector(pos)));
                                replay.Actors.Add(new DoughnutActor(true, 0, 720, 1080, (tickStart, tickEnd), "rgba(25,25,112, 0.4)", new PositionConnector(pos)));
                            }
                            if (pattern.Contains("4"))
                            {
                                replay.Actors.Add(new DoughnutActor(true, explosion, 1080, 1440, (tickStart, tickEnd), "rgba(25,25,112, 0.2)", new PositionConnector(pos)));
                                replay.Actors.Add(new DoughnutActor(true, 0, 1080, 1440, (tickStart, tickEnd), "rgba(25,25,112, 0.4)", new PositionConnector(pos)));
                            }
                            if (pattern.Contains("5"))
                            {
                                replay.Actors.Add(new DoughnutActor(true, explosion, 1440, 1800, (tickStart, tickEnd), "rgba(25,25,112, 0.2)", new PositionConnector(pos)));
                                replay.Actors.Add(new DoughnutActor(true, 0, 1440, 1800, (tickStart, tickEnd), "rgba(25,25,112, 0.4)", new PositionConnector(pos)));
                            }
                            if (pattern.Contains("Full"))
                            {
                                tickStart -= 1000;
                                explosion -= 1000;
                                tickEnd   -= 1000;
                                replay.Actors.Add(new CircleActor(true, explosion, 1800, (tickStart, tickEnd), "rgba(25,25,112, 0.2)", new PositionConnector(pos)));
                                replay.Actors.Add(new CircleActor(true, 0, 1800, (tickStart, tickEnd), "rgba(25,25,112, 0.4)", new PositionConnector(pos)));
                            }
                        }
                    }
                }
                List <CastLog> slam = cls.Where(x => x.SkillId == 31875).ToList();
                foreach (CastLog c in slam)
                {
                    int start       = (int)c.Time;
                    int impactPoint = 1185;
                    int impactTime  = start + impactPoint;
                    int end         = (int)Math.Min(start + c.ActualDuration, impactTime);
                    int radius      = 320;
                    replay.Actors.Add(new CircleActor(true, 0, radius, (start, end), "rgba(255, 0, 0, 0.2)", new AgentConnector(target)));
                    replay.Actors.Add(new CircleActor(true, 0, radius, (impactTime - 10, impactTime + 100), "rgba(255, 0, 0, 0.4)", new AgentConnector(target)));
                }
                List <CombatItem> protection = log.CombatData.GetBoonData(31877).Where(x => x.IsBuffRemove != ParseEnum.BuffRemove.Manual).ToList();
                int protectionStart          = 0;
                foreach (CombatItem c in protection)
                {
                    if (c.IsBuffRemove == ParseEnum.BuffRemove.None)
                    {
                        protectionStart = (int)(log.FightData.ToFightSpace(c.Time));
                    }
                    else
                    {
                        int protectionEnd = (int)(log.FightData.ToFightSpace(c.Time));
                        replay.Actors.Add(new CircleActor(true, 0, 300, (protectionStart, protectionEnd), "rgba(0, 180, 255, 0.5)", new AgentConnector(target)));
                    }
                }
                break;

            case (ushort)ChargedSoul:
                (int, int)lifespan = ((int)replay.TimeOffsets.start, (int)replay.TimeOffsets.end);
                replay.Actors.Add(new CircleActor(false, 0, 220, lifespan, "rgba(255, 150, 0, 0.5)", new AgentConnector(target)));
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
        public override void ComputeTargetCombatReplayActors(Target target, ParsedLog log, CombatReplay replay)
        {
            List <CastLog> cls = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.KeepConstruct:

                List <CombatItem> kcOrbCollect = GetFilteredList(log.CombatData, 35025, target, true);
                int kcOrbStart = 0, kcOrbEnd = 0;
                foreach (CombatItem c in kcOrbCollect)
                {
                    if (c.IsBuffRemove == ParseEnum.BuffRemove.None)
                    {
                        kcOrbStart = (int)log.FightData.ToFightSpace(c.Time);
                    }
                    else
                    {
                        kcOrbEnd = (int)log.FightData.ToFightSpace(c.Time);
                        replay.Actors.Add(new CircleActor(false, 0, 300, (kcOrbStart, kcOrbEnd), "rgba(255, 0, 0, 0.5)", new AgentConnector(target)));
                        replay.Actors.Add(new CircleActor(true, kcOrbEnd, 300, (kcOrbStart, kcOrbEnd), "rgba(255, 0, 0, 0.5)", new AgentConnector(target)));
                    }
                }
                List <CastLog> towerDrop = cls.Where(x => x.SkillId == 35086).ToList();
                foreach (CastLog c in towerDrop)
                {
                    int     start     = (int)c.Time;
                    int     end       = start + c.ActualDuration;
                    int     skillCast = end - 1000;
                    Point3D next      = replay.Positions.FirstOrDefault(x => x.Time >= end);
                    Point3D prev      = replay.Positions.LastOrDefault(x => x.Time <= end);
                    if (prev != null || next != null)
                    {
                        replay.Actors.Add(new CircleActor(false, 0, 400, (start, skillCast), "rgba(255, 150, 0, 0.5)", new InterpolatedPositionConnector(prev, next, end)));
                        replay.Actors.Add(new CircleActor(true, skillCast, 400, (start, skillCast), "rgba(255, 150, 0, 0.5)", new InterpolatedPositionConnector(prev, next, end)));
                    }
                }
                List <CastLog> blades1    = cls.Where(x => x.SkillId == 35064).ToList();
                List <CastLog> blades2    = cls.Where(x => x.SkillId == 35137).ToList();
                List <CastLog> blades3    = cls.Where(x => x.SkillId == 34971).ToList();
                int            bladeDelay = 150;
                int            duration   = 1000;
                foreach (CastLog c in blades1)
                {
                    int     ticks  = (int)Math.Max(0, Math.Min(Math.Ceiling((c.ActualDuration - 1150) / 1000.0), 9));
                    int     start  = (int)c.Time + bladeDelay;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time < start + 1000);
                    if (facing == null)
                    {
                        continue;
                    }
                    replay.Actors.Add(new CircleActor(true, 0, 200, (start, start + (ticks + 1) * 1000), "rgba(255,0,0,0.4)", new AgentConnector(target)));
                    replay.Actors.Add(new PieActor(true, 0, 1600, facing, 360 * 3 / 32, (start, start + 2 * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));     // First blade lasts twice as long
                    for (int i = 1; i < ticks; i++)
                    {
                        replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(facing.Y, facing.X) * 180 / Math.PI + i * 360 / 8), 360 * 3 / 32, (start + 1000 + i * duration, start + 1000 + (i + 1) * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));     // First blade lasts longer
                    }
                }
                foreach (CastLog c in blades2)
                {
                    int     ticks  = (int)Math.Max(0, Math.Min(Math.Ceiling((c.ActualDuration - 1150) / 1000.0), 9));
                    int     start  = (int)c.Time + bladeDelay;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time < start + 1000);
                    if (facing == null)
                    {
                        continue;
                    }
                    replay.Actors.Add(new CircleActor(true, 0, 200, (start, start + (ticks + 1) * 1000), "rgba(255,0,0,0.4)", new AgentConnector(target)));
                    replay.Actors.Add(new PieActor(true, 0, 1600, facing, 360 * 3 / 32, (start, start + 2 * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));                                                            // First blade lasts twice as long
                    replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI), 360 * 3 / 32, (start, start + 2 * duration), "rgba(255,200,0,0.5)", new AgentConnector(target))); // First blade lasts twice as long
                    for (int i = 1; i < ticks; i++)
                    {
                        replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(facing.Y, facing.X) * 180 / Math.PI + i * 360 / 8), 360 * 3 / 32, (start + 1000 + i * duration, start + 1000 + (i + 1) * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));     // First blade lasts longer
                        replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI + i * 360 / 8), 360 * 3 / 32, (start + 1000 + i * duration, start + 1000 + (i + 1) * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));   // First blade lasts longer
                    }
                }
                foreach (CastLog c in blades3)
                {
                    int     ticks  = (int)Math.Max(0, Math.Min(Math.Ceiling((c.ActualDuration - 1150) / 1000.0), 9));
                    int     start  = (int)c.Time + bladeDelay;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time < start + 1000);
                    if (facing == null)
                    {
                        continue;
                    }
                    replay.Actors.Add(new CircleActor(true, 0, 200, (start, start + (ticks + 1) * 1000), "rgba(255,0,0,0.4)", new AgentConnector(target)));
                    replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI), 360 * 3 / 32, (start, start + 2 * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));       // First blade lasts twice as long
                    replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI + 120), 360 * 3 / 32, (start, start + 2 * duration), "rgba(255,200,0,0.5)", new AgentConnector(target))); // First blade lasts twice as long
                    replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI - 120), 360 * 3 / 32, (start, start + 2 * duration), "rgba(255,200,0,0.5)", new AgentConnector(target))); // First blade lasts twice as long
                    for (int i = 1; i < ticks; i++)
                    {
                        replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI + i * 360 / 8), 360 * 3 / 32, (start + 1000 + i * duration, start + 1000 + (i + 1) * duration), "rgba(255,200,0,0.5)", new AgentConnector(target)));       // First blade lasts longer
                        replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI + i * 360 / 8 + 120), 360 * 3 / 32, (start + 1000 + i * duration, start + 1000 + (i + 1) * duration), "rgba(255,200,0,0.5)", new AgentConnector(target))); // First blade lasts longer
                        replay.Actors.Add(new PieActor(true, 0, 1600, (int)Math.Round(Math.Atan2(-facing.Y, -facing.X) * 180 / Math.PI + i * 360 / 8 - 120), 360 * 3 / 32, (start + 1000 + i * duration, start + 1000 + (i + 1) * duration), "rgba(255,200,0,0.5)", new AgentConnector(target))); // First blade lasts longer
                    }
                }
                // phantasms locations
                HashSet <ushort> phantasmsID = new HashSet <ushort>
                {
                    (ushort)Jessica,
                    (ushort)Olson,
                    (ushort)Engul,
                    (ushort)Faerla,
                    (ushort)Caulle,
                    (ushort)Henley,
                    (ushort)Galletta,
                    (ushort)Ianim,
                };
                foreach (Mob m in TrashMobs)
                {
                    if (phantasmsID.Contains(m.ID))
                    {
                        int     start = (int)log.FightData.ToFightSpace(m.FirstAware);
                        Point3D pos   = m.GetCombatReplayPositions(log).FirstOrDefault();
                        if (pos != null)
                        {
                            replay.Actors.Add(new CircleActor(true, 0, 300, (start - 5000, start), "rgba(220, 50, 0, 0.5)", new PositionConnector(pos)));
                            replay.Actors.Add(new CircleActor(true, start, 300, (start - 5000, start), "rgba(220, 50, 0, 0.5)", new PositionConnector(pos)));
                        }
                    }
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
示例#11
0
        public override void ComputeAdditionalTargetData(Target target, ParsedLog log)
        {
            CombatReplay   replay = target.CombatReplay;
            List <CastLog> cls    = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.Nikare:
                //CC
                List <CastLog> barrageN = cls.Where(x => x.SkillId == 51977).ToList();
                foreach (CastLog c in barrageN)
                {
                    replay.Actors.Add(new CircleActor(true, 0, 250, ((int)c.Time, (int)c.Time + c.ActualDuration), "rgba(0, 180, 255, 0.3)", new AgentConnector(target)));
                }
                //Platform wipe (CM only)
                List <CastLog> aquaticDomainN = cls.Where(x => x.SkillId == 52374).ToList();
                foreach (CastLog c in aquaticDomainN)
                {
                    int start    = (int)c.Time;
                    int duration = c.ActualDuration;
                    int end      = start + duration;
                    int radius   = 800;
                    replay.Actors.Add(new CircleActor(true, end, radius, (start, end), "rgba(255, 255, 0, 0.3)", new AgentConnector(target)));
                }
                break;

            case (ushort)ParseEnum.TargetIDS.Kenut:
                //CC
                List <CastLog> barrageK = cls.Where(x => x.SkillId == 51977).ToList();
                foreach (CastLog c in barrageK)
                {
                    replay.Actors.Add(new CircleActor(true, 0, 250, ((int)c.Time, (int)c.Time + c.ActualDuration), "rgba(0, 180, 255, 0.3)", new AgentConnector(target)));
                }
                //Platform wipe (CM only)
                List <CastLog> aquaticDomainK = cls.Where(x => x.SkillId == 52374).ToList();
                foreach (CastLog c in aquaticDomainK)
                {
                    int start    = (int)c.Time;
                    int duration = c.ActualDuration;
                    int end      = start + duration;
                    int radius   = 800;
                    replay.Actors.Add(new CircleActor(true, end, radius, (start, end), "rgba(255, 255, 0, 0.3)", new AgentConnector(target)));
                }
                List <CastLog> shockwave = cls.Where(x => x.SkillId == 53018).ToList();
                foreach (CastLog c in shockwave)
                {
                    int start    = (int)c.Time;
                    int delay    = 960;
                    int duration = 3000;
                    int radius   = 1200;
                    replay.Actors.Add(new CircleActor(false, start + delay + duration, radius, (start + delay, start + delay + duration), "rgba(100, 200, 255, 0.5)", new AgentConnector(target)));
                }
                List <CastLog> boonSteal = cls.Where(x => x.SkillId == 51965).ToList();
                foreach (CastLog c in boonSteal)
                {
                    int     start    = (int)c.Time;
                    int     delay    = 1000;
                    int     duration = 500;
                    int     width    = 500;
                    int     height   = 250;
                    Point3D facing   = replay.Rotations.FirstOrDefault(x => x.Time >= start);
                    if (facing != null)
                    {
                        int rotation = Point3D.GetRotationFromFacing(facing);
                        replay.Actors.Add(new RotatedRectangleActor(false, 0, width, height, rotation, width / 2, (start + delay, start + delay + duration), "rgba(255, 175, 0, 0.8)", new AgentConnector(target)));
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, rotation, width / 2, (start + delay, start + delay + duration), "rgba(255, 175, 0, 0.2)", new AgentConnector(target)));
                    }
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
示例#12
0
        public override void ComputePlayerCombatReplayActors(Player p, ParsedLog log, CombatReplay replay)
        {
            // fixated
            List <AbstractBuffEvent> fixated = GetFilteredList(log.CombatData, 56510, p, true);
            int fixatedStart = 0;

            foreach (AbstractBuffEvent c in fixated)
            {
                if (c is BuffApplyEvent)
                {
                    fixatedStart = Math.Max((int)c.Time, 0);
                }
                else
                {
                    int fixatedEnd = (int)c.Time;
                    replay.Actors.Add(new CircleActor(true, 0, 120, (fixatedStart, fixatedEnd), "rgba(255, 80, 255, 0.3)", new AgentConnector(p)));
                }
            }
            // Magma drop
            List <AbstractBuffEvent> magmaDrop = GetFilteredList(log.CombatData, 56475, p, true);
            int magmaDropStart = 0;
            int magmaRadius    = 420;
            int magmaOffset    = 4000;

            foreach (AbstractBuffEvent c in magmaDrop)
            {
                if (c is BuffApplyEvent)
                {
                    magmaDropStart = (int)c.Time;
                }
                else
                {
                    int magmaDropEnd = (int)c.Time;
                    replay.Actors.Add(new CircleActor(true, 0, magmaRadius, (magmaDropStart, magmaDropEnd), "rgba(255, 150, 0, 0.15)", new AgentConnector(p)));
                    replay.Actors.Add(new CircleActor(true, magmaDropEnd, magmaRadius, (magmaDropStart, magmaDropEnd), "rgba(255, 150, 0, 0.25)", new AgentConnector(p)));
                    Point3D magmaNextPos = replay.PolledPositions.FirstOrDefault(x => x.Time >= magmaDropEnd);
                    Point3D magmaPrevPos = replay.PolledPositions.LastOrDefault(x => x.Time <= magmaDropEnd);
                    if (magmaNextPos != null || magmaPrevPos != null)
                    {
                        replay.Actors.Add(new CircleActor(true, 0, magmaRadius, (magmaDropEnd, magmaDropEnd + magmaOffset), "rgba(255, 220, 50, 0.15)", new InterpolatedPositionConnector(magmaPrevPos, magmaNextPos, magmaDropEnd)));
                        replay.Actors.Add(new CircleActor(true, magmaDropEnd + magmaOffset, magmaRadius, (magmaDropEnd, magmaDropEnd + magmaOffset), "rgba(255, 220, 50, 0.25)", new InterpolatedPositionConnector(magmaPrevPos, magmaNextPos, magmaDropEnd)));
                        replay.Actors.Add(new CircleActor(true, 0, magmaRadius, (magmaDropEnd + magmaOffset, (int)log.FightData.FightDuration), "rgba(255, 220, 50, 0.5)", new InterpolatedPositionConnector(magmaPrevPos, magmaNextPos, magmaDropEnd)));
                    }
                }
            }
            //sapping surge, bad red tether
            List <AbstractBuffEvent> sappingSurge = GetFilteredList(log.CombatData, 56118, p, true);
            int surgeStart             = 0;
            AbstractMasterActor source = null;

            foreach (AbstractBuffEvent c in sappingSurge)
            {
                if (c is BuffApplyEvent)
                {
                    Target qadim = Targets.Find(x => x.ID == (ushort)ParseEnum.TargetIDS.PeerlessQadim);
                    surgeStart = (int)c.Time;
                    source     = (AbstractMasterActor)log.PlayerList.FirstOrDefault(x => x.AgentItem == c.By) ?? qadim;
                }
                else
                {
                    int surgeEnd = (int)c.Time;
                    if (source != null)
                    {
                        replay.Actors.Add(new LineActor(0, (surgeStart, surgeEnd), "rgba(255, 0, 0, 0.4)", new AgentConnector(p), new AgentConnector(source)));
                    }
                }
            }
            // kinetic abundance, good (blue) tether
            List <AbstractBuffEvent> kineticAbundance = GetFilteredList(log.CombatData, 56609, p, true);
            int kinStart = 0;
            AbstractMasterActor kinSource = null;

            foreach (AbstractBuffEvent c in kineticAbundance)
            {
                if (c is BuffApplyEvent)
                {
                    kinStart = (int)c.Time;
                    //kinSource = log.PlayerList.FirstOrDefault(x => x.AgentItem == c.By);
                    kinSource = (AbstractMasterActor)log.PlayerList.FirstOrDefault(x => x.AgentItem == c.By) ?? TrashMobs.FirstOrDefault(x => x.AgentItem == c.By);
                }
                else
                {
                    int kinEnd = (int)c.Time;
                    if (kinSource != null)
                    {
                        replay.Actors.Add(new LineActor(0, (kinStart, kinEnd), "rgba(0, 0, 255, 0.4)", new AgentConnector(p), new AgentConnector(kinSource)));
                    }
                }
            }
        }
        public override void ComputeTargetCombatReplayActors(Target target, ParsedLog log, CombatReplay replay)
        {
            List <CastLog> cls = target.GetCastLogs(log, 0, log.FightData.FightDuration);

            switch (target.ID)
            {
            case (ushort)ParseEnum.TargetIDS.Sabetha:
                List <CastLog> flameWall = cls.Where(x => x.SkillId == 31332).ToList();
                foreach (CastLog c in flameWall)
                {
                    int     start = (int)c.Time;
                    int     preCastTime = 2800;
                    int     duration = 10000;
                    int     width = 1300; int height = 60;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time <= start);
                    if (facing != null)
                    {
                        int initialDirection = (int)(Math.Atan2(facing.Y, facing.X) * 180 / Math.PI);
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, initialDirection, width / 2, (start, start + preCastTime), "rgba(255, 100, 0, 0.2)", new AgentConnector(target)));
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, initialDirection, width / 2, 360, (start + preCastTime, start + preCastTime + duration), "rgba(255, 50, 0, 0.5)", new AgentConnector(target)));
                    }
                }
                break;

            case (ushort)Kernan:
                List <CastLog> bulletHail = cls.Where(x => x.SkillId == 31721).ToList();
                foreach (CastLog c in bulletHail)
                {
                    int     start           = (int)c.Time;
                    int     firstConeStart  = start;
                    int     secondConeStart = start + 800;
                    int     thirdConeStart  = start + 1600;
                    int     firstConeEnd    = firstConeStart + 400;
                    int     secondConeEnd   = secondConeStart + 400;
                    int     thirdConeEnd    = thirdConeStart + 400;
                    int     radius          = 1500;
                    Point3D facing          = replay.Rotations.LastOrDefault(x => x.Time <= start);
                    if (facing != null)
                    {
                        replay.Actors.Add(new PieActor(true, 0, radius, facing, 28, (firstConeStart, firstConeEnd), "rgba(255,200,0,0.3)", new AgentConnector(target)));
                        replay.Actors.Add(new PieActor(true, 0, radius, facing, 54, (secondConeStart, secondConeEnd), "rgba(255,200,0,0.3)", new AgentConnector(target)));
                        replay.Actors.Add(new PieActor(true, 0, radius, facing, 81, (thirdConeStart, thirdConeEnd), "rgba(255,200,0,0.3)", new AgentConnector(target)));
                    }
                }
                break;

            case (ushort)Knuckles:
                List <CastLog> breakbar = cls.Where(x => x.SkillId == 31763).ToList();
                foreach (CastLog c in breakbar)
                {
                    replay.Actors.Add(new CircleActor(true, 0, 180, ((int)c.Time, (int)c.Time + c.ActualDuration), "rgba(0, 180, 255, 0.3)", new AgentConnector(target)));
                }
                break;

            case (ushort)Karde:
                List <CastLog> flameBlast = cls.Where(x => x.SkillId == 31761).ToList();
                foreach (CastLog c in flameBlast)
                {
                    int     start  = (int)c.Time;
                    int     end    = start + 4000;
                    int     radius = 600;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time <= start);
                    if (facing != null)
                    {
                        replay.Actors.Add(new PieActor(true, 0, radius, facing, 60, (start, end), "rgba(255,200,0,0.5)", new AgentConnector(target)));
                    }
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }