Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public ItemInfo()
 {
     ItemInfo.UpdateConsumableStatus(this);
     return;
 }