Server.Items.BulletinMessage.Deserialize C# (CSharp) Method

Deserialize() public method

public Deserialize ( Server.GenericReader reader ) : void
reader Server.GenericReader
return void
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				case 0:
				{
					m_Poster = reader.ReadMobile();
					m_Subject = reader.ReadString();
					m_Time = reader.ReadDateTime();
					m_LastPostTime = reader.ReadDateTime();
					bool hasThread = reader.ReadBool();
					m_Thread = reader.ReadItem() as BulletinMessage;
					m_PostedName = reader.ReadString();
					m_PostedBody = reader.ReadInt();
					m_PostedHue = reader.ReadInt();

					m_PostedEquip = new BulletinEquip[reader.ReadInt()];

					for ( int i = 0; i < m_PostedEquip.Length; ++i )
					{
						m_PostedEquip[i].itemID = reader.ReadInt();
						m_PostedEquip[i].hue = reader.ReadInt();
					}

					m_Lines = new string[reader.ReadInt()];

					for ( int i = 0; i < m_Lines.Length; ++i )
						m_Lines[i] = reader.ReadString();

					if ( hasThread && m_Thread == null )
						Delete();

					if ( version == 0 )
						ValidationQueue<BulletinMessage>.Add( this );

					break;
				}
			}
		}