示例#1
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);
 }
示例#2
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);
     }
 }
示例#3
0
 public void Update(int hash, int planecount, CustomHousePlane[] planes)
 {
     Hash = hash;
     m_planeCount = planecount;
     m_planes = planes;
 }