Aura.Channel.World.Inventory.CreatureInventory.AddMainInventory C# (CSharp) Method

AddMainInventory() public method

Adds main inventories (inv, personal, VIP). Call after creature's defaults (RaceInfo) have been loaded.
public AddMainInventory ( ) : void
return void
		public void AddMainInventory()
		{
			if (_creature.RaceData == null)
				Log.Warning("Race for creature '{0}' ({1:X16}) not loaded before initializing main inventory.", _creature.Name, _creature.EntityId);

			var width = (_creature.RaceData != null ? _creature.InventoryWidth : DefaultWidth);
			if (width > MaxWidth)
			{
				width = MaxWidth;
				Log.Warning("AddMainInventory: Width exceeds max, using {0} instead.", MaxWidth);
			}

			var height = (_creature.RaceData != null ? _creature.InventoryHeight : DefaultHeight);
			if (height > MaxHeight)
			{
				height = MaxHeight;
				Log.Warning("AddMainInventory: Height exceeds max, using {0} instead.", MaxHeight);
			}

			// TODO: Race check
			this.Add(new InventoryPocketNormal(Pocket.Inventory, width, height));
			this.Add(new InventoryPocketNormal(Pocket.PersonalInventory, width, height));
			this.Add(new InventoryPocketNormal(Pocket.VIPInventory, width, height));
		}