Exemple #1
0
 public InventoryContainer(InventoryContainerBase inventoryBase)
 {
     Seed       = inventoryBase.Seed;
     Name       = inventoryBase.Name;
     SlotAmount = inventoryBase.SlotAmount;
     Slots      = inventoryBase.Slots ?? new InventoryItem[SlotAmount];
 }
Exemple #2
0
        public EquipmentInventory(InventoryContainerBase inventoryBase) : base(inventoryBase)
        {
            Update += (item, type) =>
            {
                RefreshItemClassifications();

                if (type == InventoryUpdateType.Remove && item != null && item.IsWeapon())
                {
                    ((WeaponItem)item).Unequip();
                }
            };
        }
Exemple #3
0
        public JobStorageInventory(InventoryContainerBase inventoryBase, JobStorageProfile parent) : base(inventoryBase)
        {
            Visibility = manager => Cache.Character.Metadata.Employment == parent.Job.Attachment &&
                         Cache.Entity.Position.Distance(parent.Position) < 2f;

            Update += (item, type) =>
            {
                parent.Storage.Metadata.Items = Slots.Where(self => self != null && self.Seed != "__none").ToList();
                parent.Commit();

                EventSystem.GetModule().Send("storage:update", parent.Storage);
            };
        }
Exemple #4
0
 public PocketsInventory(InventoryContainerBase inventoryBase) : base(inventoryBase)
 {
 }
Exemple #5
0
 public ProximityInventory(InventoryContainerBase inventoryBase) : base(inventoryBase)
 {
     Registration += Register;
 }