Exemple #1
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            if (from == null)
            {
                return;
            }

            if (info.ButtonID == 0)
            {
                m_From.SendMessage(m_Mobile.Name + " declines your request to mate the two daemons.");
                m_Mobile.SendMessage("You decline " + m_From.Name + "'s request to mate the two daemons.");
            }
            if (info.ButtonID == 1)
            {
                m_ED1.Blessed  = true;
                m_ED1.Pregnant = true;

                DaemonMatingTimer mt = new DaemonMatingTimer(m_ED1, TimeSpan.FromDays(3.0));
                mt.Start();
                m_ED1.EndDaemonMating = DateTime.UtcNow + TimeSpan.FromDays(3.0);

                m_From.SendMessage(m_Mobile.Name + " accepts your request to mate the two daemons.");
                m_Mobile.SendMessage("You accept " + m_From.Name + "'s request to mate the two daemons.");
            }
        }
  public override void OnResponse( NetState state, RelayInfo info )
  {
   Mobile from = state.Mobile; 
 
   if ( from == null )
    return;
 
   if ( info.ButtonID == 0 )
   {
    m_From.SendMessage( m_Mobile.Name +" declines your request to mate the two daemons." );
    m_Mobile.SendMessage( "You decline "+ m_From.Name +"'s request to mate the two daemons." );
   }
   if ( info.ButtonID == 1 )
   {
    m_ED1.Blessed = true;
    m_ED1.Pregnant = true;
 
    DaemonMatingTimer mt = new DaemonMatingTimer( m_ED1, TimeSpan.FromDays( 3.0 ) );
    mt.Start();
    m_ED1.EndDaemonMating = DateTime.UtcNow + TimeSpan.FromDays( 3.0 );
 
    m_From.SendMessage( m_Mobile.Name +" accepts your request to mate the two daemons." );
    m_Mobile.SendMessage( "You accept "+ m_From.Name +"'s request to mate the two daemons." );
   }
  }