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