FIx equipment preset flea seach not showing any offers
This commit is contained in:
parent
68f2bb8495
commit
882d1b6ee5
@ -86,6 +86,8 @@ export class RagfairController
|
|||||||
|
|
||||||
public getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult
|
public getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult
|
||||||
{
|
{
|
||||||
|
const pmcProfile = this.profileHelper.getPmcProfile(sessionID);
|
||||||
|
|
||||||
const itemsToAdd = this.ragfairHelper.filterCategories(sessionID, searchRequest);
|
const itemsToAdd = this.ragfairHelper.filterCategories(sessionID, searchRequest);
|
||||||
const traderAssorts = this.ragfairHelper.getDisplayableAssorts(sessionID);
|
const traderAssorts = this.ragfairHelper.getDisplayableAssorts(sessionID);
|
||||||
const result: IGetOffersResult = {
|
const result: IGetOffersResult = {
|
||||||
@ -94,10 +96,9 @@ export class RagfairController
|
|||||||
selectedCategory: searchRequest.handbookId,
|
selectedCategory: searchRequest.handbookId,
|
||||||
};
|
};
|
||||||
|
|
||||||
const pmcProfile = this.profileHelper.getPmcProfile(sessionID);
|
|
||||||
|
|
||||||
result.offers = this.getOffersForSearchType(searchRequest, itemsToAdd, traderAssorts, pmcProfile);
|
result.offers = this.getOffersForSearchType(searchRequest, itemsToAdd, traderAssorts, pmcProfile);
|
||||||
|
|
||||||
|
// Client requested a category refresh
|
||||||
if (searchRequest.updateOfferCount)
|
if (searchRequest.updateOfferCount)
|
||||||
{
|
{
|
||||||
result.categories = this.getSpecificCategories(pmcProfile, searchRequest, result.offers);
|
result.categories = this.getSpecificCategories(pmcProfile, searchRequest, result.offers);
|
||||||
|
@ -702,7 +702,11 @@ export class RagfairOfferHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// weapon/equipment search + offer is preset
|
// weapon/equipment search + offer is preset
|
||||||
if (searchRequest.buildCount && this.presetHelper.hasPreset(offerRootItem._tpl))
|
if (
|
||||||
|
Object.keys(searchRequest.buildItems).length === 0 // Prevent equipment loadout searches filtering out presets
|
||||||
|
&& searchRequest.buildCount
|
||||||
|
&& this.presetHelper.hasPreset(offerRootItem._tpl)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user