Beispiel #1
0
 public override void Read(PacketReader r)
 {
     Time = r.ReadInt32();
     SlotObject = (SlotObject)new SlotObject().Read(r);
     ItemUsePos = (Location)new Location().Read(r);
     UseType = r.ReadByte();
 }
Beispiel #2
0
 public override void Read(PacketReader r)
 {
     Time = r.ReadInt32();
     Position = (Location)new Location().Read(r);
     SlotObject1 = (SlotObject)new SlotObject().Read(r);
     SlotObject2 = (SlotObject)new SlotObject().Read(r);
 }
Beispiel #3
0
 public override void Read(PacketReader r)
 {
     Time = r.ReadInt32();
     BulletId = r.ReadByte();
     ContainerType = r.ReadInt16();
     Position = (Location)new Location().Read(r);
     Angle = r.ReadSingle();
 }
Beispiel #4
0
 public override void Read(PacketReader r)
 {
     EffectType = (EffectType)r.ReadByte();
     TargetId = r.ReadInt32();
     PosA =(Location) new Location().Read(r);
     PosB = (Location) new Location().Read(r);
     Color = ARGB.Read(r);
 }
Beispiel #5
0
 public override void Read(PacketReader r)
 {
     Location = (Location) new Location().Read(r);
     Radius = r.ReadSingle();
     Damage = r.ReadUInt16();
     Effects = (ConditionEffectIndex)r.ReadByte();
     EffectDuration = r.ReadSingle();
     OriginType = r.ReadInt16();
 }
Beispiel #6
0
 public override void Read(PacketReader r)
 {
     BulletId = r.ReadByte();
     OwnerId = r.ReadInt32();
     ContainerType = r.ReadInt32();
     StartingLoc = (Location) new Location().Read(r);
     Angle = r.ReadSingle();
     Damage = r.ReadInt16();
 }
Beispiel #7
0
 public override void Read(PacketReader r)
 {
     TickId = r.ReadInt32();
     Time = r.ReadInt32();
     NewPosition = (Location)new Location().Read(r);
     Records = new LocationRecord[r.ReadInt16()];
     for (int i = 0; i < Records.Length; i++)
         Records[i] = (LocationRecord)new LocationRecord().Read(r);
 }
Beispiel #8
0
        public override void Read(PacketReader r)
        {
            BulletId = r.ReadByte();
            OwnerId = r.ReadInt32();
            BulletType = r.ReadByte();
            Location = (Location) new Location().Read(r);
            Angle = r.ReadSingle();
            Damage = r.ReadInt16();

            if (r.BaseStream.Position < r.BaseStream.Length)
            {
                NumShots = r.ReadByte();
                AngleInc = r.ReadSingle();
            }
            else
            {
                NumShots = 1;
                AngleInc = 0.0F;
            }
        }
Beispiel #9
0
 public override void Read(PacketReader r)
 {
     Time = r.ReadInt32();
     Position = (Location)new Location().Read(r);
 }
Beispiel #10
0
 private float GetAngle(Location l1, Location l2)
 {
     float dX = l2.X - l1.X;
     float dY = l2.Y - l1.Y;
     return (float)Math.Atan2(dY, dX);
 }
Beispiel #11
0
 public float DistanceTo(Location location)
 {
     return (float)Math.Sqrt(DistanceSquaredTo(location));
 }
Beispiel #12
0
 public float DistanceSquaredTo(Location location)
 {
     float dx = location.X - X;
     float dy = location.Y - Y;
     return dx * dx + dy * dy;
 }
Beispiel #13
0
 public override void Read(PacketReader r)
 {
     ObjectId = r.ReadInt32();
     Location = (Location) new Location().Read(r);
 }
Beispiel #14
0
 public void Parse(NewTickPacket newTick)
 {
     foreach (Status status in newTick.Statuses)
         if (status.ObjectId == OwnerObjectId)
             foreach (StatData data in status.Data)
             {
                 Pos = status.Position;
                 Parse(data.Id, data.IntValue, data.StringValue);
             }
 }