Made traderOffersNeedRefreshing() more resilent to incorrectly installed trader mods

This commit is contained in:
Dev 2024-05-05 11:50:24 +01:00
parent 84d5462955
commit 6d8311150e

View File

@ -168,6 +168,13 @@ export class RagfairOfferService
{
const trader = this.databaseServer.getTables().traders[traderID];
if (!trader || !trader.base)
{
this.logger.error(`Trader ${traderID} lacks a base file, cannot check for refresh status`);
return false;
}
// No value, occurs when first run, trader offers need to be added to flea
if (typeof trader.base.refreshTraderRagfairOffers !== "boolean")
{