Remove second call to this.saveServer.getProfiles()
+ only run offer processing for profiles that have the necessary level to create flea offers
This commit is contained in:
parent
991ee312bd
commit
22d158f8a4
@ -308,9 +308,15 @@ export class RagfairController
|
||||
*/
|
||||
public update(): void
|
||||
{
|
||||
const profilesDict = this.saveServer.getProfiles();
|
||||
for (const sessionID in this.saveServer.getProfiles())
|
||||
{
|
||||
if (this.saveServer.getProfile(sessionID).characters.pmc.RagfairInfo !== undefined)
|
||||
// Check profile is capable of creating offers
|
||||
const pmcProfile = profilesDict[sessionID].characters.pmc;
|
||||
if (
|
||||
pmcProfile.RagfairInfo !== undefined
|
||||
&& pmcProfile.Info.Level >= this.databaseServer.getTables().globals.config.RagFair.minUserLevel
|
||||
)
|
||||
{
|
||||
this.ragfairOfferHelper.processOffersOnProfile(sessionID);
|
||||
}
|
||||
|
@ -701,7 +701,7 @@ export class RagfairOfferHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
// weapon/equipment search + offer is preset
|
||||
// Weapon/equipment search + offer is preset
|
||||
if (
|
||||
Object.keys(searchRequest.buildItems).length === 0 // Prevent equipment loadout searches filtering out presets
|
||||
&& searchRequest.buildCount
|
||||
|
Loading…
Reference in New Issue
Block a user