public FinalDefensesAll(ParsedEvtcLog log, PhaseData phase, AbstractSingleActor actor) : base(log, phase, actor, null) { var dead = new List <(long start, long end)>(); var down = new List <(long start, long end)>(); var dc = new List <(long start, long end)>(); (dead, down, dc) = actor.GetStatus(log); long start = phase.Start; long end = phase.End; DownCount = log.MechanicData.GetMechanicLogs(log, SkillItem.DownId).Count(x => x.Actor == actor && x.Time >= start && x.Time <= end); DeadCount = log.MechanicData.GetMechanicLogs(log, SkillItem.DeathId).Count(x => x.Actor == actor && x.Time >= start && x.Time <= end); DcCount = log.MechanicData.GetMechanicLogs(log, SkillItem.DCId).Count(x => x.Actor == actor && x.Time >= start && x.Time <= end); DownDuration = down.Where(x => x.end >= start && x.start <= end).Sum(x => Math.Min(end, x.end) - Math.Max(x.start, start)); DeadDuration = dead.Where(x => x.end >= start && x.start <= end).Sum(x => Math.Min(end, x.end) - Math.Max(x.start, start)); DcDuration = dc.Where(x => x.end >= start && x.start <= end).Sum(x => Math.Min(end, x.end) - Math.Max(x.start, start)); }
protected void SetStatus(ParsedEvtcLog log, AbstractSingleActor a) { var dead = new List <long>(); Dead = dead; var down = new List <long>(); Down = down; var dc = new List <long>(); Dc = dc; (IReadOnlyList <(long start, long end)> deads, IReadOnlyList <(long start, long end)> downs, IReadOnlyList <(long start, long end)> dcs) = a.GetStatus(log); foreach ((long start, long end) in deads) { dead.Add(start); dead.Add(end); } foreach ((long start, long end) in downs) { down.Add(start); down.Add(end); } foreach ((long start, long end) in dcs) { dc.Add(start); dc.Add(end); } }
public FinalDefensesAll(ParsedEvtcLog log, long start, long end, AbstractSingleActor actor) : base(log, start, end, actor, null) { (IReadOnlyList <(long start, long end)> dead, IReadOnlyList <(long start, long end)> down, IReadOnlyList <(long start, long end)> dc) = actor.GetStatus(log); DownCount = log.MechanicData.GetMechanicLogs(log, SkillItem.DownId).Count(x => x.Actor == actor && x.Time >= start && x.Time <= end); DeadCount = log.MechanicData.GetMechanicLogs(log, SkillItem.DeathId).Count(x => x.Actor == actor && x.Time >= start && x.Time <= end); DcCount = log.MechanicData.GetMechanicLogs(log, SkillItem.DCId).Count(x => x.Actor == actor && x.Time >= start && x.Time <= end); DownDuration = down.Where(x => x.end >= start && x.start <= end).Sum(x => Math.Min(end, x.end) - Math.Max(x.start, start)); DeadDuration = dead.Where(x => x.end >= start && x.start <= end).Sum(x => Math.Min(end, x.end) - Math.Max(x.start, start)); DcDuration = dc.Where(x => x.end >= start && x.start <= end).Sum(x => Math.Min(end, x.end) - Math.Max(x.start, start)); }
internal AbstractSingleActorSerializable(AbstractSingleActor actor, ParsedEvtcLog log, CombatReplayMap map, CombatReplay replay, string type) { Img = actor.GetIcon(); ID = actor.UniqueID; Positions = new List <double>(); Type = type; foreach (Point3D pos in replay.PolledPositions) { (double x, double y) = map.GetMapCoord(pos.X, pos.Y); Positions.Add(x); Positions.Add(y); } if (actor.AgentItem.IsPlayer) { Dead = new List <long>(); Down = new List <long>(); Dc = new List <long>(); (IReadOnlyList <(long start, long end)> deads, IReadOnlyList <(long start, long end)> downs, IReadOnlyList <(long start, long end)> dcs) = actor.GetStatus(log); foreach ((long start, long end) in deads) { Dead.Add(start); Dead.Add(end); } foreach ((long start, long end) in downs) { Down.Add(start); Down.Add(end); } foreach ((long start, long end) in dcs) { Dc.Add(start); Dc.Add(end); } } }