/// <summary> /// Update the observable collections /// </summary> public void UpdateInventoryCategories() { Treasures.Clear(); Gems.Clear(); ArmorSet.Clear(); Buffs.Clear(); foreach (var gameItemQuantity in _inventory) { if (gameItemQuantity.GameItem is Treasure) { Treasures.Add(gameItemQuantity); } if (gameItemQuantity.GameItem is Gem) { Gems.Add(gameItemQuantity); } if (gameItemQuantity.GameItem is ArmorSet) { ArmorSet.Add(gameItemQuantity); } if (gameItemQuantity.GameItem is Buff) { Buffs.Add(gameItemQuantity); } } }
public override void Dispose() { base.Dispose(); Gems.Clear(); IGems.Clear(); CellsList.Clear(); }