update readme + profile file to create file with correct name

This commit is contained in:
Chomp 2021-09-23 16:00:12 +01:00
parent c4781e35d4
commit 3fcc776e3f
2 changed files with 4 additions and 4 deletions

View File

@ -10,18 +10,18 @@ namespace MarketPriceLookup
static void Main(string[] args) static void Main(string[] args)
{ {
// loop over all items and get a price for each // loop over all items and get a price for each
var priceList = new Dictionary<string, Prices>(); var priceList = new Dictionary<string, int>();
foreach (var item in ItemTemplateHelper.Items) foreach (var item in ItemTemplateHelper.Items)
{ {
var priceData = MarketPricesHelper.GetItemPrice(item.Key); var priceData = MarketPricesHelper.GetItemPrice(item.Key);
if (priceData != null && priceData.Price != 0) if (priceData != null && priceData.Price != 0)
{ {
priceList.Add(item.Key, priceData); priceList.Add(item.Key, priceData.Average7DaysPrice);
} }
} }
// save found prices to json // save found prices to json
JsonWriter.WriteJson(priceList, "output", Directory.GetCurrentDirectory(), "itemPriceSnapshot"); JsonWriter.WriteJson(priceList, "output", Directory.GetCurrentDirectory(), "prices");
} }
} }
} }

View File

@ -1,6 +1,6 @@
# MarketPriceLookup # MarketPriceLookup
Creates a file with prices that can be used to update database\traders\ragfair\itemPriceSnapshot.json Creates a file with prices that can be used to update assets\database\templates\prices.json
place marketPrices.csv with prices in the following folder: place marketPrices.csv with prices in the following folder:
And run MarketPriceLookup/program.cs And run MarketPriceLookup/program.cs