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
|
public update(): void
|
||||||
{
|
{
|
||||||
|
const profilesDict = this.saveServer.getProfiles();
|
||||||
for (const sessionID in 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);
|
this.ragfairOfferHelper.processOffersOnProfile(sessionID);
|
||||||
}
|
}
|
||||||
|
@ -701,7 +701,7 @@ export class RagfairOfferHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// weapon/equipment search + offer is preset
|
// Weapon/equipment search + offer is preset
|
||||||
if (
|
if (
|
||||||
Object.keys(searchRequest.buildItems).length === 0 // Prevent equipment loadout searches filtering out presets
|
Object.keys(searchRequest.buildItems).length === 0 // Prevent equipment loadout searches filtering out presets
|
||||||
&& searchRequest.buildCount
|
&& searchRequest.buildCount
|
||||||
|
Loading…
x
Reference in New Issue
Block a user