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); }
//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; } }
//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; } }
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); }