예제 #1
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.Cairn:
                List <CastLog> swordSweep = cls.Where(x => x.SkillId == 37631).ToList();
                foreach (CastLog c in swordSweep)
                {
                    int     start = (int)c.Time;
                    int     preCastTime = 1400;
                    int     initialHitDuration = 850;
                    int     sweepDuration = 1100;
                    int     width = 1400; int height = 80;
                    Point3D facing = replay.Rotations.FirstOrDefault(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(200, 0, 255, 0.1)", new AgentConnector(target)));
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, initialDirection, width / 2, (start + preCastTime, start + preCastTime + initialHitDuration), "rgba(150, 0, 180, 0.5)", new AgentConnector(target)));
                        replay.Actors.Add(new RotatedRectangleActor(true, 0, width, height, initialDirection, width / 2, 360, (start + preCastTime + initialHitDuration, start + preCastTime + initialHitDuration + sweepDuration), "rgba(150, 0, 180, 0.5)", new AgentConnector(target)));
                    }
                }
                List <CastLog> wave = cls.Where(x => x.SkillId == 37910).ToList();
                foreach (CastLog c in wave)
                {
                    int start        = (int)c.Time;
                    int preCastTime  = 1200;
                    int duration     = 600;
                    int firstRadius  = 400;
                    int secondRadius = 700;
                    int thirdRadius  = 1000;
                    int fourthRadius = 1300;
                    replay.Actors.Add(new DoughnutActor(true, 0, firstRadius, secondRadius, (start + preCastTime, start + preCastTime + duration), "rgba(100,0,155,0.3)", new AgentConnector(target)));
                    replay.Actors.Add(new DoughnutActor(true, 0, secondRadius, thirdRadius, (start + preCastTime + 2 * duration, start + preCastTime + 3 * duration), "rgba(100,0,155,0.3)", new AgentConnector(target)));
                    replay.Actors.Add(new DoughnutActor(true, 0, thirdRadius, fourthRadius, (start + preCastTime + 5 * duration, start + preCastTime + 6 * duration), "rgba(100,0,155,0.3)", 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.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");
            }
        }
예제 #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.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");
            }
        }
예제 #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.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");
            }
        }