Пример #1
0
 /// <summary>
 /// Creates a new <see cref="IS_HLV"/> object.
 /// </summary>
 /// <param name="buffer">The data to populate the packet with.</param>
 public IS_HLV(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     PLID = reader.ReadByte();
     HLVC = (HlvcFlags)reader.ReadByte();
     reader.Skip(1);
     Time = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
     C = new CarContOBJ(reader);
 }
Пример #2
0
        /// <summary>
        /// Creates a new <see cref="IS_HLV"/> object.
        /// </summary>
        /// <param name="buffer">The data to populate the packet with.</param>
        public IS_HLV(byte[] buffer)
        {
            PacketReader reader = new PacketReader(buffer);

            Size = reader.ReadByte();
            Type = (PacketType)reader.ReadByte();
            ReqI = reader.ReadByte();
            PLID = reader.ReadByte();
            HLVC = (HlvcFlags)reader.ReadByte();
            reader.Skip(1);
            Time = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
            C    = new CarContOBJ(reader);
        }
Пример #3
0
        /// <summary>
        /// Creates a new IS_CSC object.
        /// </summary>
        /// <param name="buffer"></param>
        public IS_CSC(byte[] buffer)
        {
            var reader = new PacketReader(buffer);

            Size = reader.ReadByte();
            Type = (PacketType)reader.ReadByte();
            ReqI = reader.ReadByte();
            PLID = reader.ReadByte();
            reader.Skip(1);
            CSCAction = (CSCAction)reader.ReadByte();
            reader.Skip(2);
            Time = TimeSpan.FromMilliseconds(reader.ReadUInt32() * 10);
            C    = new CarContOBJ(reader);
        }
Пример #4
0
 /// <summary>
 /// Creates a new <see cref="IS_OBH"/> object.
 /// </summary>
 /// <param name="buffer">The packet data.</param>
 public IS_OBH(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     PLID = reader.ReadByte();
     SpClose = reader.ReadUInt16();
     Time = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
     C = new CarContOBJ(reader);
     X = reader.ReadInt16();
     Y = reader.ReadInt16();
     reader.Skip(2);
     Index = reader.ReadByte();
     OBHFlags = (ObjectFlags)reader.ReadByte();
 }
Пример #5
0
        /// <summary>
        /// Creates a new <see cref="IS_OBH"/> object.
        /// </summary>
        /// <param name="buffer">The packet data.</param>
        public IS_OBH(byte[] buffer)
        {
            PacketReader reader = new PacketReader(buffer);

            Size    = reader.ReadByte();
            Type    = (PacketType)reader.ReadByte();
            ReqI    = reader.ReadByte();
            PLID    = reader.ReadByte();
            SpClose = reader.ReadUInt16();
            Time    = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
            C       = new CarContOBJ(reader);
            X       = reader.ReadInt16();
            Y       = reader.ReadInt16();
            reader.Skip(2);
            Index    = reader.ReadByte();
            OBHFlags = (ObjectFlags)reader.ReadByte();
        }