Aura.Channel.World.Inventory.BankTabPocket.TryAdd C# (CSharp) Метод

TryAdd() публичный Метод

Attempts to add the item at the given position.
TODO: Inventory really needs some refactoring, we shouldn't have to override such methods.
public TryAdd ( Item item, int x, int y ) : bool
item Item
x int
y int
Результат bool
		public bool TryAdd(Item item, int x, int y)
		{
			if (x + item.Data.Width > _width || y + item.Data.Height > _height)
				return false;

			var collidingItems = this.GetCollidingItems((uint)x, (uint)y, item);
			if (collidingItems.Count > 0)
				return false;

			item.Move(this.Pocket, x, y);
			this.AddUnsafe(item);

			return true;
		}
	}