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 static void UpdateCustomHouseData(Serial serial, int hash, int planecount, CustomHousePlane[] planes)
 {
     CustomHouse house;
     if (m_customHouses.ContainsKey(serial))
     {
         house = m_customHouses[serial];
         
     }
     else
     {
         house = new CustomHouse(serial);
         m_customHouses.Add(serial, house);
     }
     house.Update(hash, planecount, planes);
 }
Beispiel #3
0
 public void Update(int hash, int planecount, CustomHousePlane[] planes)
 {
     Hash = hash;
     m_planeCount = planecount;
     m_planes = planes;
 }