Allow damaged ammo boxes to added to output
This commit is contained in:
parent
c7061b6e84
commit
e9f1e77cc8
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -50,9 +50,10 @@ namespace MarketPriceLookup.Common.Helpers
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.changeLast48hPercent > 100)
|
if (item.changeLast48hPercent > 110)
|
||||||
{
|
{
|
||||||
LoggingHelpers.LogWarning($"Item {item.id} {item.name} Has had recent {item.changeLast48hPercent}% increase in price. {item.historicalPrices.Length} price values");
|
LoggingHelpers.LogWarning($"Item {item.id} {item.name} Has had recent {item.changeLast48hPercent}% increase in price. {item.historicalPrices.Length} price values");
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var averagedItemPrice = GetAveragedPrice(item);
|
var averagedItemPrice = GetAveragedPrice(item);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using MarketPriceLookup.Common;
|
using MarketPriceLookup.Common;
|
||||||
using MarketPriceLookup.Common.Helpers;
|
using MarketPriceLookup.Common.Helpers;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -46,14 +47,15 @@ namespace MarketPriceLookup
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
priceList.Add(item.Key, priceData.Average7DaysPrice);
|
var priceOfItem = Math.Min(priceData.Average7DaysPrice, priceData.Average24hPrice);
|
||||||
|
|
||||||
|
priceList.Add(item.Key, priceOfItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ammo packs are easy to exploit, they're never listed on flea which casues server to use handbook price, often contain ammo worth x100 the cost of handbook price
|
// Ammo packs are easy to exploit, they're never listed on flea which casues server to use handbook price, often contain ammo worth x100 the cost of handbook price
|
||||||
var ammoPacks = ItemTemplateHelper.Items.Values
|
var ammoPacks = ItemTemplateHelper.Items.Values
|
||||||
.Where(x => (x._parent == "5661632d4bdc2d903d8b456b" || x._parent == "543be5cb4bdc2deb348b4568")
|
.Where(x => (x._parent == "5661632d4bdc2d903d8b456b" || x._parent == "543be5cb4bdc2deb348b4568")
|
||||||
&& (x._name.Contains("item_ammo_box_") || x._name.Contains("ammo_box_"))
|
&& (x._name.Contains("item_ammo_box_") || x._name.Contains("ammo_box_")));
|
||||||
&& !x._name.Contains("_damaged"));
|
|
||||||
|
|
||||||
foreach (var ammoPack in ammoPacks)
|
foreach (var ammoPack in ammoPacks)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user