Beispiel #1
0
        public DaemonMatingGump(Mobile from, Mobile mobile, EvolutionDaemon ed1, EvolutionDaemon ed2) : base(25, 50)
        {
            Closable = false;
            Dragable = false;

            m_From   = from;
            m_Mobile = mobile;
            m_ED1    = ed1;
            m_ED2    = ed2;

            AddPage(0);

            AddBackground(25, 10, 420, 200, 5054);

            AddImageTiled(33, 20, 401, 181, 2624);
            AddAlphaRegion(33, 20, 401, 181);

            AddLabel(125, 148, 1152, m_From.Name + " would like to mate " + m_ED1.Name + " with");
            AddLabel(125, 158, 1152, m_ED2.Name + ".");

            AddButton(100, 50, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddLabel(130, 50, 1152, "Allow them to mate.");
            AddButton(100, 75, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddLabel(130, 75, 1152, "Do not allow them to mate.");
        }
Beispiel #2
0
 public BreatheTimer(Mobile m, EvolutionDaemon owner, Mobile from, TimeSpan duration) : base(duration)
 {
     ed       = owner;
     m_Mobile = m;
     m_From   = from;
     Priority = TimerPriority.TwoFiftyMS;
 }
Beispiel #3
0
		public override void OnDoubleClick( Mobile from )
		{
                        if ( !IsChildOf( from.Backpack ) ) 
                        { 
                                from.SendMessage( "You must have the daemon's egg in your backpack to hatch it." ); 
                        } 
			else if ( this.AllowEvolution == true )
			{
				this.Delete();
				from.SendMessage( "You are now the proud owner of a daemon hatchling!!" );

				EvolutionDaemon daemon = new EvolutionDaemon();

         			daemon.Map = from.Map; 
         			daemon.Location = from.Location; 

				daemon.Controlled = true;

				daemon.ControlMaster = from;

				daemon.IsBonded = true;
			}
			else
			{
				from.SendMessage( "This egg is not yet ready to be hatched." );
			}
		}
Beispiel #4
0
 public DaemonLoyaltyTimer(EvolutionDaemon owner, TimeSpan duration) : base(duration)
 {
     Priority = TimerPriority.OneSecond;
     ed       = owner;
 }
Beispiel #5
0
        private void DaemonMatingTarget_Callback(Mobile from, object obj)
        {
            if (obj is EvolutionDaemon && obj is BaseCreature)
            {
                BaseCreature    bc = (BaseCreature)obj;
                EvolutionDaemon ed = (EvolutionDaemon)obj;

                if (ed.Controlled == true && ed.ControlMaster == from)
                {
                    if (ed.Female == false)
                    {
                        if (ed.AllowDaemonMating == true)
                        {
                            this.Blessed  = true;
                            this.Pregnant = true;

                            m_DaemonMatingTimer = new DaemonMatingTimer(this, TimeSpan.FromDays(3.0));
                            m_DaemonMatingTimer.Start();

                            m_EndDaemonMating = DateTime.UtcNow + TimeSpan.FromDays(3.0);
                        }
                        else
                        {
                            from.SendMessage("This male daemon is not old enough to mate!");
                        }
                    }
                    else
                    {
                        from.SendMessage("This daemon is not male!");
                    }
                }
                else if (ed.Controlled == true)
                {
                    if (ed.Female == false)
                    {
                        if (ed.AllowDaemonMating == true)
                        {
                            if (ed.ControlMaster != null)
                            {
                                ed.ControlMaster.SendGump(new DaemonMatingGump(from, ed.ControlMaster, this, ed));
                                from.SendMessage("You ask the owner of the daemon if they will let your female mate with their male.");
                            }
                            else
                            {
                                from.SendMessage("This daemon is wild.");
                            }
                        }
                        else
                        {
                            from.SendMessage("This male daemon is not old enough to mate!");
                        }
                    }
                    else
                    {
                        from.SendMessage("This daemon is not male!");
                    }
                }
                else
                {
                    from.SendMessage("This daemon is wild.");
                }
            }
            else
            {
                from.SendMessage("That is not a daemon!");
            }
        }
  public DaemonMatingGump( Mobile from, Mobile mobile, EvolutionDaemon ed1, EvolutionDaemon ed2 ) : base( 25, 50 )
  {
   Closable = false; 
   Dragable = false; 
 
   m_From = from;
   m_Mobile = mobile;
   m_ED1 = ed1;
   m_ED2 = ed2;
 
   AddPage( 0 );
 
   AddBackground( 25, 10, 420, 200, 5054 );
 
   AddImageTiled( 33, 20, 401, 181, 2624 );
   AddAlphaRegion( 33, 20, 401, 181 );
 
   AddLabel( 125, 148, 1152, m_From.Name +" would like to mate "+ m_ED1.Name +" with" );
   AddLabel( 125, 158, 1152, m_ED2.Name +"." );
 
   AddButton( 100, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 );
   AddLabel( 130, 50, 1152, "Allow them to mate." );
   AddButton( 100, 75, 4005, 4007, 0, GumpButtonType.Reply, 0 );
   AddLabel( 130, 75, 1152, "Do not allow them to mate." );
  }
 public DaemonLoyaltyTimer( EvolutionDaemon owner, TimeSpan duration ) : base( duration ) 
 { 
  Priority = TimerPriority.OneSecond;
  ed = owner;
 }
 public BreatheTimer( Mobile m, EvolutionDaemon owner, Mobile from, TimeSpan duration ) : base( duration ) 
 {
  ed = owner;
  m_Mobile = m;
  m_From = from;
  Priority = TimerPriority.TwoFiftyMS;
 }