mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Fix being unable to sell items on flea that have been adjusted via itemPriceMultiplier property
Take into account adjustment when calcualting sell chance
This commit is contained in:
parent
805190abb4
commit
872c6282ec
@ -393,8 +393,18 @@ export class RagfairController
|
|||||||
|
|
||||||
// Get average of items quality+children
|
// Get average of items quality+children
|
||||||
const qualityMultiplier = this.itemHelper.getItemQualityModifierForOfferItems(offer.items);
|
const qualityMultiplier = this.itemHelper.getItemQualityModifierForOfferItems(offer.items);
|
||||||
const averageOfferPrice = this.ragfairPriceService.getFleaPriceForOfferItems(offer.items)
|
let averageOfferPrice = this.ragfairPriceService.getFleaPriceForOfferItems(offer.items);
|
||||||
* rootItem.upd.StackObjectsCount * qualityMultiplier;
|
|
||||||
|
// Check for and apply item price modifer if it exists
|
||||||
|
const itemPriceModifer = this.ragfairConfig.dynamic.itemPriceMultiplier[rootItem._tpl];
|
||||||
|
if (itemPriceModifer)
|
||||||
|
{
|
||||||
|
averageOfferPrice *= itemPriceModifer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Multipler single item price by stack count and quality
|
||||||
|
averageOfferPrice *= rootItem.upd.StackObjectsCount * qualityMultiplier;
|
||||||
|
|
||||||
const itemStackCount = (offerRequest.sellInOnePiece) ? 1 : rootItem.upd.StackObjectsCount;
|
const itemStackCount = (offerRequest.sellInOnePiece) ? 1 : rootItem.upd.StackObjectsCount;
|
||||||
|
|
||||||
// Get averaged price of a single item being listed
|
// Get averaged price of a single item being listed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user