private static void UpdateConsumableStatus(ItemInfo info) { if (info.Consumable) { if (non_consumables.FirstOrDefault(x => x.Name == info.Name) != null) non_consumables.Remove(info); if (consumables.FirstOrDefault(x => x.Name == info.Name) == null) consumables.Add(info); } else { if (consumables.FirstOrDefault(x => x.Name == info.Name) != null) consumables.Remove(info); if (non_consumables.FirstOrDefault(x => x.Name == info.Name) == null) non_consumables.Add(info); } return; }
private static void RemoveReference(ItemInfo info) { if (consumables.FirstOrDefault(x => x.Name == info.Name) != null) consumables.Remove(info); if (non_consumables.FirstOrDefault(x => x.Name == info.Name) != null) non_consumables.Remove(info); return; }