public int NewGearCost(string old, string newOne, string steamId) { int cost = 0; int oldPrice = 0; int newPrice = 0; if (string.IsNullOrEmpty(steamId)) { throw new CustomException(ErrorCodes.Codes.NullSteamId); } List <string> oldItems = new List <string>(); List <string> newItems = new List <string>(); old.ParseLoadoutToList(oldItems); newOne.ParseLoadoutToList(newItems); oldItems.ForEach(item => oldPrice += pm.GetItemPrice(item, steamId)); newItems.ForEach(item => newPrice += pm.GetItemPrice(item, steamId)); cost = newPrice - oldPrice; return(cost); }
public int NewGearCost(string old, string newOne) { int cost = 0; int oldPrice = 0; int newPrice = 0; List <string> oldItems = new List <string>(); List <string> newItems = new List <string>(); old.ParseLoadoutToList(oldItems); newOne.ParseLoadoutToList(newItems); oldItems.ForEach(item => oldPrice += pm.GetItemPrice(item)); newItems.ForEach(item => newPrice += pm.GetItemPrice(item)); cost = newPrice - oldPrice; return(cost); }