0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Fixed PMC loot generator only using flea price not flea or handbook price. Now uses whatever is higher

This commit is contained in:
Dev 2024-05-06 15:21:35 +01:00
parent 17296fabfd
commit 9fb1d9728e

View File

@ -23,6 +23,8 @@ export class PMCLootGenerator
protected backpackLootPool: Record<string, number> = {};
protected pmcConfig: IPmcConfig;
protected roubleTpl = "5449016a4bdc2d6f028b456f";
constructor(
@inject("ItemHelper") protected itemHelper: ItemHelper,
@inject("DatabaseServer") protected databaseServer: DatabaseServer,
@ -76,7 +78,7 @@ export class PMCLootGenerator
else
{
// Set price of item as its weight
const price = this.ragfairPriceService.getFleaPriceForItem(itemToAdd._id);
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, this.roubleTpl);
this.pocketLootPool[itemToAdd._id] = price;
}
}
@ -134,7 +136,7 @@ export class PMCLootGenerator
else
{
// Set price of item as its weight
const price = this.ragfairPriceService.getFleaPriceForItem(itemToAdd._id);
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, this.roubleTpl);
this.vestLootPool[itemToAdd._id] = price;
}
}
@ -202,7 +204,7 @@ export class PMCLootGenerator
else
{
// Set price of item as its weight
const price = this.ragfairPriceService.getFleaPriceForItem(itemToAdd._id);
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, this.roubleTpl);
this.backpackLootPool[itemToAdd._id] = price;
}
}