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(); } }
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(); }
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(); }
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(); }
public MailMessage( PlayerMobile sender, PlayerMobile recipient, string subject, string body, MailContainer attached, int cod ) : this( sender, recipient, subject, body, attached, cod, TimeSpan.Zero ) { }
public MailMessage(PlayerMobile sender, PlayerMobile recipient, string subject, string body, MailContainer attached, int cod) : this(sender, recipient, subject, body, attached, cod, TimeSpan.Zero) { }