Fix nullguard firing for all traders

This commit is contained in:
Dev 2023-11-10 19:00:04 +00:00
parent ade4875362
commit 7849a730f2

View File

@ -246,7 +246,7 @@ export class GameController
return; return;
} }
if (trader.base.repair?.quality) if (trader.base.repair?.quality === undefined)
{ {
this.logger.warning(`Trader ${trader.base._id} ${trader.base.nickname} is missing a repair quality value, adding in default value`); this.logger.warning(`Trader ${trader.base._id} ${trader.base.nickname} is missing a repair quality value, adding in default value`);
trader.base.repair.quality = this.databaseServer.getTables().traders.ragfair.base.repair.quality; trader.base.repair.quality = this.databaseServer.getTables().traders.ragfair.base.repair.quality;