public override void CheckSuccess(CombatData combatData, AgentData agentData, FightData fightData, HashSet <AgentItem> playerAgents) { base.CheckSuccess(combatData, agentData, fightData, playerAgents); if (!fightData.Success) { NPC desmina = Targets.Find(x => x.ID == (int)ParseEnum.TargetIDS.Desmina); if (desmina == null) { throw new InvalidOperationException("Error Encountered: Desmina not found"); } ExitCombatEvent ooc = combatData.GetExitCombatEvents(desmina.AgentItem).LastOrDefault(); if (ooc != null) { long time = 0; foreach (NPC mob in TrashMobs.Where(x => x.ID == (int)SpiritHorde3)) { DespawnEvent dspwnHorde = combatData.GetDespawnEvents(mob.AgentItem).LastOrDefault(); if (dspwnHorde != null) { time = Math.Max(dspwnHorde.Time, time); } } DespawnEvent dspwn = combatData.GetDespawnEvents(desmina.AgentItem).LastOrDefault(); if (time != 0 && dspwn == null && time <= desmina.LastAware) { fightData.SetSuccess(true, time); } } } }
internal override void ComputeNPCCombatReplayActors(NPC target, ParsedEvtcLog log, CombatReplay replay) { IReadOnlyList <AbstractCastEvent> cls = target.GetCastEvents(log, 0, log.FightData.FightEnd); int start = (int)replay.TimeOffsets.start; int end = (int)replay.TimeOffsets.end; switch (target.ID) { case (int)ArcDPSEnums.TargetID.PeerlessQadim: var cataCycle = cls.Where(x => x.SkillId == 56329).ToList(); var forceOfHavoc = cls.Where(x => x.SkillId == 56017).ToList(); var forceOfRetal = cls.Where(x => x.SkillId == ForceOfRetaliationCast).ToList(); var etherStrikes = cls.Where(x => x.SkillId == 56012 || x.SkillId == 56653).ToList(); var causticChaos = cls.Where(x => x.SkillId == 56332).ToList(); var expoReperc = cls.Where(x => x.SkillId == 56223).ToList(); foreach (AbstractCastEvent c in cataCycle) { int magmaRadius = 850; start = (int)c.Time; end = (int)c.EndTime; Point3D pylonPosition = replay.PolledPositions.LastOrDefault(x => x.Time <= end); replay.Decorations.Add(new CircleDecoration(true, 0, magmaRadius, (start, end), "rgba(255, 50, 50, 0.15)", new PositionConnector(pylonPosition))); replay.Decorations.Add(new CircleDecoration(true, end, magmaRadius, (start, end), "rgba(255, 50, 50, 0.25)", new PositionConnector(pylonPosition))); replay.Decorations.Add(new CircleDecoration(true, 0, magmaRadius, (end, (int)log.FightData.FightEnd), "rgba(255, 50, 0, 0.5)", new PositionConnector(pylonPosition))); } foreach (AbstractCastEvent c in forceOfHavoc) { int roadLength = 2400; int roadWidth = 360; int hitboxOffset = 200; int subdivisions = 100; int rollOutTime = 3250; start = (int)c.Time; int preCastTime = 1500; int duration = 22500; Point3D facing = replay.Rotations.LastOrDefault(x => x.Time <= start + 1000); Point3D position = replay.Positions.LastOrDefault(x => x.Time <= start + 1000); if (facing != null && position != null) { float direction = ParserHelper.RadianToDegreeF(Math.Atan2(facing.Y, facing.X)); replay.Decorations.Add(new RotatedRectangleDecoration(true, 0, roadLength, roadWidth, direction, roadLength / 2 + 200, (start, start + preCastTime), "rgba(255, 0, 0, 0.1)", new PositionConnector(position))); for (int i = 0; i < subdivisions; i++) { replay.Decorations.Add(new RotatedRectangleDecoration(true, 0, roadLength / subdivisions, roadWidth, direction, (int)((i + 0.5) * roadLength / subdivisions + hitboxOffset), (start + preCastTime + i * (rollOutTime / subdivisions), start + preCastTime + i * (rollOutTime / subdivisions) + duration), "rgba(143, 0, 179, 0.6)", new PositionConnector(position))); } } } foreach (AbstractCastEvent c in forceOfRetal) { int radius = 650; double radiusIncrement = 433.3; int preCastTime = 1800; int timeBetweenCascades = 200; int cascades = 5; start = (int)c.Time + 1400; Point3D position = replay.Positions.LastOrDefault(x => x.Time <= start + 1000); replay.Decorations.Add(new CircleDecoration(true, 0, radius, (start, start + preCastTime), "rgba(255, 220, 50, 0.15)", new PositionConnector(position))); replay.Decorations.Add(new CircleDecoration(true, start + preCastTime, radius, (start, start + preCastTime), "rgba(255, 220, 50, 0.25)", new PositionConnector(position))); for (int i = 0; i < cascades; i++) { replay.Decorations.Add(new DoughnutDecoration(true, 0, radius + (int)(radiusIncrement * i), radius + (int)(radiusIncrement * (i + 1)), (start + preCastTime + timeBetweenCascades * i, start + preCastTime + timeBetweenCascades * (i + 1)), "rgba(30, 30, 30, 0.5)", new PositionConnector(position))); replay.Decorations.Add(new DoughnutDecoration(true, 0, radius + (int)(radiusIncrement * i), radius + (int)(radiusIncrement * (i + 1)), (start + preCastTime + timeBetweenCascades * (i + 1), start + preCastTime + timeBetweenCascades * (i + 2)), "rgba(50, 20, 50, 0.25)", new PositionConnector(position))); } } foreach (AbstractCastEvent c in etherStrikes) { int coneRadius = 2600; int coneAngle = 60; start = (int)c.Time; end = start + 250; Point3D facing = replay.Rotations.LastOrDefault(x => x.Time <= start + 300); replay.Decorations.Add(new PieDecoration(false, 0, coneRadius, facing, coneAngle, (start, end), "rgba(255, 100, 0, 0.30)", new AgentConnector(target))); replay.Decorations.Add(new PieDecoration(true, 0, coneRadius, facing, coneAngle, (start, end), "rgba(255, 100, 0, 0.1)", new AgentConnector(target))); } foreach (AbstractCastEvent c in causticChaos) { double acceleration = c.Acceleration; double ratio = 1.0; if (acceleration > 0) { ratio = acceleration * 0.5 + 1; } else { ratio = acceleration * 0.6 + 1; } int chaosLength = 2600; int chaosWidth = 100; start = (int)c.Time; end = (int)c.EndTime; int aimTime = (int)((double)c.ExpectedDuration * ratio); replay.Decorations.Add(new FacingDecoration((0, end), new AgentConnector(target), replay.PolledRotations)); replay.Decorations.Add(new FacingRectangleDecoration((start, end), new AgentConnector(target), replay.PolledRotations, chaosLength, chaosWidth, chaosLength / 2, "rgba(255,100,0,0.3)")); if (end > start + aimTime) { replay.Decorations.Add(new FacingRectangleDecoration((start + aimTime, end), new AgentConnector(target), replay.PolledRotations, chaosLength, chaosWidth, chaosLength / 2, "rgba(100,100,100,0.7)")); } } foreach (AbstractCastEvent c in expoReperc) { int radius = 650; start = (int)c.Time; end = (int)c.EndTime; Point3D position = replay.Positions.LastOrDefault(x => x.Time <= start + 1000); replay.Decorations.Add(new CircleDecoration(true, 0, radius, (start, end), "rgba(255, 220, 0, 0.15)", new PositionConnector(position))); replay.Decorations.Add(new CircleDecoration(true, end, radius, (start, end), "rgba(255, 220, 50, 0.25)", new PositionConnector(position))); foreach (NPC pylon in TrashMobs.Where(x => x.ID == 21962)) { replay.Decorations.Add(new CircleDecoration(true, 0, radius, (start, end), "rgba(255, 220, 0, 0.15)", new AgentConnector(pylon))); replay.Decorations.Add(new CircleDecoration(true, end, radius, (start, end), "rgba(255, 220, 50, 0.25)", new AgentConnector(pylon))); } } break; case (int)ArcDPSEnums.TrashID.EntropicDistortion: //sapping surge, red tether List <AbstractBuffEvent> sappingSurge = GetFilteredList(log.CombatData, SappingSurge, target, true, true); int surgeStart = 0; AbstractSingleActor source = null; foreach (AbstractBuffEvent c in sappingSurge) { if (c is BuffApplyEvent) { AbstractSingleActor qadim = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.PeerlessQadim); surgeStart = (int)c.Time; source = (AbstractSingleActor)log.PlayerList.FirstOrDefault(x => x.AgentItem == c.CreditedBy) ?? qadim; } else { int surgeEnd = (int)c.Time; if (source != null) { replay.Decorations.Add(new LineDecoration(0, (surgeStart, surgeEnd), "rgba(255, 0, 0, 0.3)", new AgentConnector(target), new AgentConnector(source))); } } } Point3D firstEntropicPosition = replay.PolledPositions.FirstOrDefault(); if (firstEntropicPosition != null) { replay.Decorations.Add(new CircleDecoration(true, 0, 300, (start - 5000, start), "rgba(255, 0, 0, 0.4)", new PositionConnector(firstEntropicPosition))); replay.Decorations.Add(new CircleDecoration(true, start, 300, (start - 5000, start), "rgba(255, 0, 0, 0.4)", new PositionConnector(firstEntropicPosition))); } break; case (int)ArcDPSEnums.TrashID.BigKillerTornado: replay.Decorations.Add(new CircleDecoration(true, 0, 450, (start, end), "rgba(255, 150, 0, 0.4)", new AgentConnector(target))); break; case (int)ArcDPSEnums.TrashID.Pylon1: break; case (int)ArcDPSEnums.TrashID.Pylon2: break; case (int)ArcDPSEnums.TrashID.EnergyOrb: replay.Decorations.Add(new CircleDecoration(true, 0, 200, (start, end), "rgba(0, 255, 0, 0.3)", new AgentConnector(target))); break; default: break; } }