示例#1
0
        public void Deserialize(GenericReader reader)
        {
            m_Sender    = reader.ReadMobile() as PlayerMobile;
            m_Recipient = reader.ReadMobile() as PlayerMobile;
            m_Subject   = reader.ReadString();
            m_Body      = reader.ReadString();

            m_Attached = reader.ReadItem() as MailContainer;
            if (m_Attached != null)
            {
                m_COD = reader.ReadInt();
                m_Attached.AttachedTo = this;
            }

            m_Expiration  = reader.ReadDateTime();
            m_ReceiveDate = reader.ReadDateTime();

            if (Expired)
            {
                Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerCallback(Cleanup));
            }
            else
            {
                Add();
            }
        }
示例#2
0
		public MailMessage( PlayerMobile sender, PlayerMobile recipient, string subject, string body, MailContainer attached, int cod, TimeSpan delay )
		{
			m_Serial = MailSerial.NewMessage;
			MailSystem.AddMessage( this );
			m_Sender = sender;
			m_Recipient = recipient;
			m_Attached = attached;
			m_COD = cod;
			m_Expiration = DateTime.UtcNow + MailSystem.MailDuration;
			m_ReceiveDate = DateTime.UtcNow + delay;

			Add();
		}
示例#3
0
        public MailMessage(PlayerMobile sender, PlayerMobile recipient, string subject, string body, MailContainer attached, int cod, TimeSpan delay)
        {
            m_Serial = MailSerial.NewMessage;
            MailSystem.AddMessage(this);
            m_Sender      = sender;
            m_Recipient   = recipient;
            m_Attached    = attached;
            m_COD         = cod;
            m_Expiration  = DateTime.Now + MailSystem.MailDuration;
            m_ReceiveDate = DateTime.Now + delay;

            Add();
        }
示例#4
0
		public void Deserialize( GenericReader reader )
		{
			m_Sender = reader.ReadMobile() as PlayerMobile;
			m_Recipient = reader.ReadMobile() as PlayerMobile;
			m_Subject = reader.ReadString();
			m_Body = reader.ReadString();

			m_Attached = reader.ReadItem() as MailContainer;
			if ( m_Attached != null )
			{
				m_COD = reader.ReadInt();
				m_Attached.AttachedTo = this;
			}

			m_Expiration = reader.ReadDateTime();
			m_ReceiveDate = reader.ReadDateTime();

			if ( Expired )
				Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerCallback( Cleanup ) );
			else
				Add();
		}
示例#5
0
		public MailMessage( PlayerMobile sender, PlayerMobile recipient, string subject, string body, MailContainer attached, int cod ) : this( sender, recipient, subject, body, attached, cod, TimeSpan.Zero )
		{
		}
示例#6
0
 public MailMessage(PlayerMobile sender, PlayerMobile recipient, string subject, string body, MailContainer attached, int cod) : this(sender, recipient, subject, body, attached, cod, TimeSpan.Zero)
 {
 }