universalis api seems to have changed scaling for velocity metric
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Steven Polley 2023-12-16 11:39:06 -07:00
parent b391fa164c
commit e1356e3d92
1 changed files with 2 additions and 2 deletions

View File

@ -487,13 +487,13 @@ func sortItemSlice() {
// Calculate the base metric based on sale price and velocity
if item.MarketBoardListing.MinPriceHQ != 0 {
// Use HQ by default
item.Velocity = int(math.Round(item.MarketBoardListing.HqSaleVelocity * 10 / 2.857143)) // 2.857143 is max universalis sale velocity value, so this gives us an "out of 10" rating
item.Velocity = int(math.Round(item.MarketBoardListing.HqSaleVelocity * 10)) // 2.857143 is max universalis sale velocity value, so this gives us an "out of 10" rating
item.CraftingMetric = item.MarketBoardListing.MinPriceHQ
item.ListingMetric = item.CraftingMetric*item.Velocity + item.MarketBoardListing.MinPriceHQ
} else {
// Item is normal quality only for example, housing items
item.Velocity = int(math.Round(item.MarketBoardListing.NqSaleVelocity * 10 / 2.857143)) // 2.857143 is max universalis sale velocity value, so this gives us an "out of 10" rating
item.Velocity = int(math.Round(item.MarketBoardListing.NqSaleVelocity * 10)) // 2.857143 is max universalis sale velocity value, so this gives us an "out of 10" rating
item.CraftingMetric = item.MarketBoardListing.MinPriceNQ
item.ListingMetric = item.CraftingMetric*item.Velocity + item.MarketBoardListing.MinPriceNQ