Example #1
0
        //

        public override AbstractSingleActorSerializable GetCombatReplayJSON(CombatReplayMap map, ParsedLog log)
        {
            if (CombatReplay == null)
            {
                InitCombatReplay(log);
            }
            return(new NPCSerializable(this, log, map, CombatReplay));
        }
 public override object GetConnectedTo(CombatReplayMap map, ParsedLog log)
 {
     (double x, double y) = map.GetMapCoord(Position.X, Position.Y);
     return(new double[2]
     {
         x,
         y
     });
 }
        public PlayerSerializable(Player player, ParsedLog log, CombatReplayMap map, CombatReplay replay) : base(player, log, map, replay, "Player")
        {
            Group = player.Group;
            Dead  = new List <long>();
            Down  = new List <long>();
            Dc    = new List <long>();
            (List <(long start, long end)> deads, List <(long start, long end)> downs, List <(long start, long end)> dcs) = player.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 abstract object GetConnectedTo(CombatReplayMap map, ParsedLog log);
Example #5
0
 public NPCSerializable(NPC npc, ParsedLog log, CombatReplayMap map, CombatReplay replay) : base(npc, log, map, replay, log.FightData.Logic.Targets.Contains(npc) ? "Target" : "Mob")
 {
     Start = replay.TimeOffsets.start;
     End   = replay.TimeOffsets.end;
 }
 public RotatedRectangleDecorationSerializable(ParsedLog log, RotatedRectangleDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type              = "RotatedRectangle";
     Rotation          = decoration.Rotation;
     RadialTranslation = decoration.RadialTranslation;
     SpinAngle         = decoration.SpinAngle;
 }
 protected FormDecorationSerializable(ParsedLog log, FormDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Fill    = decoration.Filled;
     Color   = decoration.Color;
     Growing = decoration.Growing;
 }
Example #8
0
 public LineDecorationSerializable(ParsedLog log, LineDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type          = "Line";
     ConnectedFrom = decoration.ConnectedFrom.GetConnectedTo(map, log);
 }
Example #9
0
 protected GenericAttachedDecorationSerializable(ParsedLog log, GenericAttachedDecoration decoration, CombatReplayMap map) : base(decoration)
 {
     ConnectedTo = decoration.ConnectedTo.GetConnectedTo(map, log);
 }
 public CircleDecorationSerializable(ParsedLog log, CircleDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type      = "Circle";
     Radius    = decoration.Radius;
     MinRadius = decoration.MinRadius;
 }
Example #11
0
 public FacingDecorationSerializable(ParsedLog log, FacingDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type       = "Facing";
     FacingData = decoration.Angles.ToArray();
 }
 public override object GetConnectedTo(CombatReplayMap map, ParsedLog log)
 {
     return(_agent.GetCombatReplayID(log));
 }
Example #13
0
 protected AbstractSingleActorSerializable(AbstractSingleActor actor, ParsedLog log, CombatReplayMap map, CombatReplay replay, string type)
 {
     Img       = GeneralHelper.GetIcon(actor);
     ID        = actor.GetCombatReplayID(log);
     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);
     }
 }
Example #14
0
 public PieDecorationSerializable(ParsedLog log, PieDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type         = "Pie";
     Direction    = decoration.Direction;
     OpeningAngle = decoration.OpeningAngle;
 }
Example #15
0
 public RectangleDecorationSerializable(ParsedLog log, RectangleDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type   = "Rectangle";
     Width  = decoration.Width;
     Height = decoration.Height;
 }
Example #16
0
 public DoughnutDecorationSerializable(ParsedLog log, DoughnutDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type        = "Doughnut";
     OuterRadius = decoration.OuterRadius;
     InnerRadius = decoration.InnerRadius;
 }
Example #17
0
 public FacingRectangleDecorationSerializable(ParsedLog log, FacingRectangleDecoration decoration, CombatReplayMap map) : base(log, decoration, map)
 {
     Type   = "FacingRectangle";
     Width  = decoration.Width;
     Height = decoration.Height;
     Color  = decoration.Color;
 }