Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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;
     }
 }