Beispiel #1
0
        public override bool OnDragDrop(Mobile from, Item item)
        {
            bool canDrop = base.OnDragDrop(from, item);

            if (canDrop && item is ChickenLizardEgg)
            {
                ChickenLizardEgg egg = (ChickenLizardEgg)item;

                if (egg.TotalIncubationTime > TimeSpan.FromHours(120))
                {
                    egg.BurnEgg();
                }
                else
                {
                    egg.IncubationStart = DateTime.UtcNow;
                    egg.Incubating      = true;
                }
            }

            return(canDrop);
        }
Beispiel #2
0
        public override bool CheckFeed(Mobile from, Item dropped)
        {
            if (from.Map == null || from.Map == Map.Internal)
                return false;

            bool fed = base.CheckFeed(from, dropped);

            if (fed && DateTime.Now >= m_NextEgg)
            {
                if (Utility.RandomBool())
                {
                    ChickenLizardEgg egg = new ChickenLizardEgg();

                    if (from.Backpack == null || from.Backpack.TryDropItem(from, egg, false))
                        egg.MoveToWorld(from.Location, from.Map);
                }

                m_NextEgg = DateTime.Now + TimeSpan.FromDays(7);
            }

            return fed;
        }
Beispiel #3
0
 public ConfirmHatchGump2(Mobile from, ChickenLizardEgg egg)
 {
     m_Egg  = egg;
     m_From = from;
 }
Beispiel #4
0
 public ConfirmHatchGump2(Mobile from, ChickenLizardEgg egg)
 {
     m_Egg = egg;
     m_From = from;
 }