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.BrokenKing:
                List <CastLog> Cone = cls.Where(x => x.SkillId == 48066).ToList();
                foreach (CastLog c in Cone)
                {
                    int     start  = (int)c.Time;
                    int     end    = start + c.ActualDuration;
                    int     range  = 450;
                    int     angle  = 100;
                    Point3D facing = replay.Rotations.LastOrDefault(x => x.Time <= start + 1000);
                    if (facing == null)
                    {
                        continue;
                    }
                    replay.Actors.Add(new PieActor(true, 0, range, facing, angle, (start, end), "rgba(0,100,255,0.2)", new AgentConnector(target)));
                    replay.Actors.Add(new PieActor(true, 0, range, facing, angle, (start + 1900, end), "rgba(0,100,255,0.3)", new AgentConnector(target)));
                }
                break;

            default:
                throw new InvalidOperationException("Unknown ID in ComputeAdditionalData");
            }
        }
Exemple #2
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");
            }
        }