public override void Serialize(ICustomDataOutput writer) { writer.WriteVarInt(HouseId); writer.WriteShort((short)DoorsOnMap.Count()); foreach (var current in DoorsOnMap) { writer.WriteInt(current); } writer.WriteShort(Properties.TypeId); Properties.Serialize(writer); }
public override void Serialize(IDataWriter writer) { base.Serialize(writer); writer.WriteUShort(((ushort)(m_houseInfos.TypeID))); m_houseInfos.Serialize(writer); writer.WriteVarLong(m_realPrice); writer.WriteBoolean(m_isLocked); writer.WriteShort(m_worldX); writer.WriteShort(m_worldY); writer.WriteInt(m_mapId); writer.WriteVarShort(m_subAreaId); }
public override void Serialize(IDataWriter writer) { writer.WriteShort(((short)(m_doorsOnMap.Count))); int doorsOnMapIndex; for (doorsOnMapIndex = 0; (doorsOnMapIndex < m_doorsOnMap.Count); doorsOnMapIndex = (doorsOnMapIndex + 1)) { writer.WriteInt(m_doorsOnMap[doorsOnMapIndex]); } writer.WriteUShort(((ushort)(m_properties.TypeID))); m_properties.Serialize(writer); writer.WriteVarUhInt(m_houseId); }
public override void Serialize(IDataWriter writer) { writer.WriteVarInt(houseId); var doorsOnMap_before = writer.Position; var doorsOnMap_count = 0; writer.WriteShort(0); foreach (var entry in doorsOnMap) { writer.WriteInt(entry); doorsOnMap_count++; } var doorsOnMap_after = writer.Position; writer.Seek((int)doorsOnMap_before); writer.WriteShort((short)doorsOnMap_count); writer.Seek((int)doorsOnMap_after); writer.WriteShort(properties.TypeId); properties.Serialize(writer); }