Aura.Channel.World.Inventory.InventoryPocketNormal.Add C# (CSharp) 메소드

Add() 공개 메소드

public Add ( Item item ) : bool
item Item
리턴 bool
		public override bool Add(Item item)
		{
			for (byte y = 0; y <= _height - item.Data.Height; ++y)
			{
				for (byte x = 0; x <= _width - item.Data.Width; ++x)
				{
					if (_map[x, y] != null)
						continue;

					if (this.GetCollidingItems(x, y, item).Count == 0)
					{
						item.Move(this.Pocket, x, y);
						this.AddUnsafe(item);
						return true;
					}
				}
			}

			return false;
		}