Example #1
0
        public InventoryCache()
        {
            GameEvents.OnGameJoined   += (sender, args) => Update();
            GameEvents.OnWorldChanged += (sender, args) => Update();

            AllItems.Source = () => InventoryManager.AllItems.Where(i => !InvalidAnnIds.Contains(i.AnnId));
            Stash.Source    = () => AllItems.Where(i => i.InventorySlot == InventorySlot.SharedStash);
        }
Example #2
0
        public InventoryCache()
        {
            GameEvents.OnGameJoined   += (sender, args) => Update();
            GameEvents.OnWorldChanged += (sender, args) => Update();

            AllItems.Source = () => Core.Actors.Inventory.Where(i => !InvalidAnnIds.Contains(i.AnnId));
            Stash.Source    = () => Core.Inventory.AllItems.Where(i => i.InventorySlot == InventorySlot.SharedStash);
            Backpack.Source = () => Core.Inventory.AllItems.Where(i => i.InventorySlot == InventorySlot.BackpackItems);
        }