コード例 #1
0
ファイル: CustomHousing.cs プロジェクト: jorsi/UltimaXNA
 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
ファイル: CustomHousePacket.cs プロジェクト: jorsi/UltimaXNA
 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
ファイル: CustomHouse.cs プロジェクト: jorsi/UltimaXNA
 public void Update(int hash, int planecount, CustomHousePlane[] planes)
 {
     Hash = hash;
     m_planeCount = planecount;
     m_planes = planes;
 }