diff --git a/MarketPriceLookup.Common/Helpers/MarketPricesHelper.cs b/MarketPriceLookup.Common/Helpers/MarketPricesHelper.cs index 757dffc..d6b43a1 100644 --- a/MarketPriceLookup.Common/Helpers/MarketPricesHelper.cs +++ b/MarketPriceLookup.Common/Helpers/MarketPricesHelper.cs @@ -45,11 +45,21 @@ namespace MarketPriceLookup.Common.Helpers //string currency = GetCurrencyType(fields[7]); string bsgId = fields[8]; + if (avg7daysPrice == 0) + { + LoggingHelpers.LogError($"unable to add bad item with price average of 0, ignoring: {bsgId} {name}"); + continue; + } + if (priceFile.ContainsKey(bsgId)) { //oh no var existingItem = priceFile[bsgId]; - LoggingHelpers.LogError($"Item already exists: {bsgId} {name}. item that already exists: {existingItem.TemplateId} {existingItem.Name}"); + LoggingHelpers.LogError($"Unable to add item: {bsgId} {name}. existing item: {existingItem.TemplateId} {existingItem.Name}"); + if (existingItem.Average7DaysPrice != avg7daysPrice) + { + LoggingHelpers.LogError($"Price diff found: already existing item price: {existingItem.Average7DaysPrice} new item price: {avg7daysPrice}"); + } } else {