Fix player offers being expired before checking if they were sold

This commit is contained in:
Dev 2023-12-18 22:32:46 +00:00
parent 40ea0735ef
commit 8853159b55
3 changed files with 9 additions and 3 deletions

View File

@ -61,10 +61,13 @@ export class RagfairCallbacks implements OnLoad, OnUpdate
{
// There is a flag inside this class that only makes it run once.
this.ragfairServer.addPlayerOffers();
await this.ragfairServer.update();
// function below used to be split, merged
// Check player offers and mail payment to player if sold
this.ragfairController.update();
// Process all offers / expire offers
await this.ragfairServer.update();
return true;
}

View File

@ -307,6 +307,9 @@ export class RagfairController
return info.neededSearchId !== "";
}
/**
* Check all profiles and sell player offers / send player money for listing if it sold
*/
public update(): void
{
for (const sessionID in this.saveServer.getProfiles())

View File

@ -523,7 +523,7 @@ export class InRaidHelper
// Add the new items
serverProfile.Inventory.items = [...postRaidProfile.Inventory.items, ...serverProfile.Inventory.items];
serverProfile.Inventory.fastPanel = postRaidProfile.Inventory.fastPanel;
serverProfile.Inventory.fastPanel = postRaidProfile.Inventory.fastPanel; // Quick access items bar
serverProfile.InsuredItems = insured;
return serverProfile;