Ejemplo n.º 1
0
        public override bool Eat( Mobile from )
        {
            int x = this.X;
            int y = this.Y;
            int z = this.Z;
            Map map = this.Map;

            if ( !base.Eat( from ) )
                return false;

            if ( !IsChildOf (from.Backpack) )
            {
                Basket b = new Basket();
                b.MoveToWorld( new Point3D( x, y, z ), map );
                return true;
            }

            if ( IsChildOf (from.Backpack) )
            {
                from.AddToBackpack( new Basket() );
                return true;
            }

            return true;
        }
        public override bool Eat(Mobile from)
        {
            int x   = this.X;
            int y   = this.Y;
            int z   = this.Z;
            Map map = this.Map;

            if (!base.Eat(from))
            {
                return(false);
            }

            if (!IsChildOf(from.Backpack))
            {
                Basket b = new Basket();
                b.MoveToWorld(new Point3D(x, y, z), map);
                return(true);
            }

            if (IsChildOf(from.Backpack))
            {
                from.AddToBackpack(new Basket());
                return(true);
            }

            return(true);
        }
Ejemplo n.º 3
0
		//Assume its not locked, and can be eaten
		private static void CreateBasket( Point3D loc, Map map, object parent )
		{
			Basket basket = new Basket();

			if ( parent == null )
				basket.MoveToWorld( loc, map );
			else if ( parent is Item )
			{
				((Item)parent).AddItem( basket );
				basket.Location = loc;
			}
		}
Ejemplo n.º 4
0
        //Assume its not locked, and can be eaten
        private static void CreateBasket(Point3D loc, Map map, object parent)
        {
            Basket basket = new Basket();

            if (parent == null)
            {
                basket.MoveToWorld(loc, map);
            }
            else if (parent is Item)
            {
                ((Item)parent).AddItem(basket);
                basket.Location = loc;
            }
        }
Ejemplo n.º 5
0
        public override bool Eat(Mobile from)
        {
            var p = Location;

            if (!base.Eat(from))
            {
                return(false);
            }

            var basket = new Basket();

            if (Parent == null && DailyRare)
            {
                basket.MoveToWorld(p, from.Map);
            }
            else
            {
                from.AddToBackpack(new Basket());
            }

            return(true);
        }