Add functionality to apply a multipler to individual dynamic offers on flea
Use new functionaliy to apply a large multipler to `5.45x39mm BP gs ammo pack` items to match live data
This commit is contained in:
parent
e95ec8c790
commit
b7b08f99f2
@ -267,6 +267,10 @@
|
|||||||
"min": -2,
|
"min": -2,
|
||||||
"max": 20
|
"max": 20
|
||||||
},
|
},
|
||||||
|
"itemPriceMultiplier": {
|
||||||
|
"5737292724597765e5728562": 6,
|
||||||
|
"57372ac324597767001bc261": 5
|
||||||
|
},
|
||||||
"_currencies": "what percentage of the offers are in each currency",
|
"_currencies": "what percentage of the offers are in each currency",
|
||||||
"currencies": {
|
"currencies": {
|
||||||
"5449016a4bdc2d6f028b456f": 78,
|
"5449016a4bdc2d6f028b456f": 78,
|
||||||
|
@ -78,6 +78,8 @@ export interface Dynamic
|
|||||||
nonStackableCount: MinMax;
|
nonStackableCount: MinMax;
|
||||||
/** Range of rating offers for items being listed */
|
/** Range of rating offers for items being listed */
|
||||||
rating: MinMax;
|
rating: MinMax;
|
||||||
|
/** A multipler to apply to individual tpls price just prior to item quality adjustment */
|
||||||
|
itemPriceMultiplier: Record<string, number>;
|
||||||
/** Percentages to sell offers in each currency */
|
/** Percentages to sell offers in each currency */
|
||||||
currencies: Record<string, number>;
|
currencies: Record<string, number>;
|
||||||
/** Item tpls that should be forced to sell as a single item */
|
/** Item tpls that should be forced to sell as a single item */
|
||||||
|
@ -255,6 +255,12 @@ export class RagfairPriceService implements OnLoad
|
|||||||
isPreset = true;
|
isPreset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const manualPriceMultipler = this.ragfairConfig.dynamic.itemPriceMultiplier[item._tpl];
|
||||||
|
if (manualPriceMultipler)
|
||||||
|
{
|
||||||
|
itemPrice *= manualPriceMultipler;
|
||||||
|
}
|
||||||
|
|
||||||
// Convert to different currency if desiredCurrency param is not roubles
|
// Convert to different currency if desiredCurrency param is not roubles
|
||||||
if (desiredCurrency !== Money.ROUBLES)
|
if (desiredCurrency !== Money.ROUBLES)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user