public bool CreateContainerInstance(out DataInventoryContainer container) { if (AmINull()) { container = null; return(false); } if (Type == ContainerType.Storage) { container = new DataInventoryContainer(this); return(true); } if (Type == ContainerType.Equiptment) { container = new DataEquiptmentContainer(this); return(true); } if (Type == ContainerType.WeaponWheel) { container = new DataWeaponWheelContainer(this); return(true); } container = null; return(false); }
public ContainerInfo(DataInventoryContainer container) { InventorySlots = new SlotInfo[] { }; Id = container.ContainerId; _allowedItemTypes = container.AllowedItemTypes; ContainerType = Inventory.GetContainerTypeEnum(container); if (container.GetItemSlotsInfo(out SlotInfo[] inventorySlots)) { InventorySlots = inventorySlots; } }