Beispiel #1
0
        public CustomHousePacket(PacketReader reader)
            : base(0xD8, "Custom House Packet")
        {
            byte CompressionType = reader.ReadByte();

            if (CompressionType != 3)
            {
                m_houseSerial = Serial.Null;
                return;
            }
            reader.ReadByte(); // unknown, always 0?
            m_houseSerial  = reader.ReadInt32();
            m_revisionHash = reader.ReadInt32();

            // this is for compression type 3 only
            int bufferLength     = reader.ReadInt16();
            int trueBufferLength = reader.ReadInt16();

            m_numPlanes = reader.ReadByte();
            // end compression type 3

            m_planes = new CustomHousePlane[m_numPlanes];
            for (int i = 0; i < m_numPlanes; i++)
            {
                m_planes[i] = new CustomHousePlane(reader);
            }
        }
Beispiel #2
0
        public CustomHousePacket(PacketReader reader)
            : base(0xD8, "Custom House Packet")
        {
            var CompressionType = reader.ReadByte();

            if (CompressionType != 3)
            {
                _houseSerial = Serial.Null;
                return;
            }
            reader.ReadByte(); // unknown, always 0?
            _houseSerial  = reader.ReadInt32();
            _revisionHash = reader.ReadInt32();
            // this is for compression type 3 only
            var bufferLength     = reader.ReadInt16();
            var trueBufferLength = reader.ReadInt16();

            _numPlanes = reader.ReadByte();
            // end compression type 3
            _planes = new CustomHousePlane[_numPlanes];
            for (var i = 0; i < _numPlanes; i++)
            {
                _planes[i] = new CustomHousePlane(reader);
            }
        }