mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 02:10:44 -05:00
Resolved issue where weapon preset had its tpl overwritten with metal fuel containers tpl
This commit is contained in:
parent
b1a2f2d2c5
commit
0ae7afb335
@ -351,7 +351,7 @@ export class RagfairOfferGenerator {
|
||||
|
||||
// get assort items from param if they exist, otherwise grab freshly generated assorts
|
||||
const assortItemsToProcess: IItem[][] = replacingExpiredOffers
|
||||
? expiredOffers ?? []
|
||||
? (expiredOffers ?? [])
|
||||
: this.ragfairAssortGenerator.getAssortItems();
|
||||
|
||||
// Create offers for each item set concurrently
|
||||
@ -471,10 +471,8 @@ export class RagfairOfferGenerator {
|
||||
itemToSellDetails: ITemplateItem,
|
||||
): Promise<void> {
|
||||
// Set stack size to random value
|
||||
itemWithChildren[0].upd.StackObjectsCount = this.ragfairServerHelper.calculateDynamicStackCount(
|
||||
itemWithChildren[0]._tpl,
|
||||
isPreset,
|
||||
);
|
||||
var desiredStackSize = this.ragfairServerHelper.calculateDynamicStackCount(itemWithChildren[0]._tpl, isPreset);
|
||||
itemWithChildren[0].upd.StackObjectsCount = desiredStackSize;
|
||||
|
||||
const isBarterOffer = this.randomUtil.getChance100(this.ragfairConfig.dynamic.barter.chancePercent);
|
||||
const isPackOffer =
|
||||
|
@ -163,10 +163,7 @@ export class RagfairServerHelper {
|
||||
}
|
||||
|
||||
// Item Types to return one of
|
||||
if (
|
||||
isWeaponPreset ||
|
||||
this.itemHelper.isOfBaseclasses(itemDetails[1]._id, this.ragfairConfig.dynamic.showAsSingleStack)
|
||||
) {
|
||||
if (isWeaponPreset || this.itemHelper.isOfBaseclasses(tplId, this.ragfairConfig.dynamic.showAsSingleStack)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user