Esempio n. 1
0
        public virtual void Grow(object state)
        {
            Mobile sower = state as Mobile;

            if (sower == null || this == null || this.Deleted)
            {
                return;
            }

            Item item = Activator.CreateInstance(m_FullCrop, sower) as Item;

            if (item == null)
            {
                item = new Weeds();
            }
            else
            {
                if (item is BananaSapling)
                {
                    item.ItemID = 0xCA8;
                }
                else if (item is CoconutPalmSapling)
                {
                    item.ItemID = 0xC9A;
                }
                else if (item is DatePalmSapling)
                {
                    item.ItemID = 0xC99;
                }
            }

            item.MoveToWorld(this.Location, this.Map);

            this.Delete();
        }
Esempio n. 2
0
		public virtual void Grow( object state )
		{
			Mobile sower = state as Mobile;

			if( sower == null || this == null || this.Deleted )
				return;

			Item item = Activator.CreateInstance( m_FullCrop, sower ) as Item;

			if( item == null )
				item = new Weeds();
			else
			{
				if( item is BananaSapling )
					item.ItemID = 0xCA8;
				else if( item is CoconutPalmSapling )
					item.ItemID = 0xC9A;
				else if( item is DatePalmSapling )
					item.ItemID = 0xC99;
			}

			item.MoveToWorld( this.Location, this.Map );

			this.Delete();
		}
Esempio n. 3
0
		public virtual void GrowTree()
		{
			Item tree = null;

			try { tree = Activator.CreateInstance( FullTreeType, this.Sower ) as Item; }
			catch( Exception e ) { Server.Utilities.ExceptionManager.LogException( "BaseTreeSapling.cs", e ); }

			if( tree == null )
				tree = new Weeds();

			tree.MoveToWorld( this.Location, this.Map );

			if( m_Timer != null )
				m_Timer.Stop();
			this.Delete();
		}
Esempio n. 4
0
        public virtual void GrowTree()
        {
            Item tree = null;

            try { tree = Activator.CreateInstance(FullTreeType, this.Sower) as Item; }
            catch (Exception e) { Server.Utilities.ExceptionManager.LogException("BaseTreeSapling.cs", e); }

            if (tree == null)
            {
                tree = new Weeds();
            }

            tree.MoveToWorld(this.Location, this.Map);

            if (m_Timer != null)
            {
                m_Timer.Stop();
            }
            this.Delete();
        }