Fixed itemDelivery()
failing when trader lacks a dialogue
object (incorrectly configured custom traders)
This commit is contained in:
parent
8cbc51d20e
commit
9c81df91d1
@ -661,6 +661,12 @@ export class InraidController
|
|||||||
const pmcData = serverProfile.characters.pmc;
|
const pmcData = serverProfile.characters.pmc;
|
||||||
|
|
||||||
const dialogueTemplates = this.databaseServer.getTables().traders[traderId].dialogue;
|
const dialogueTemplates = this.databaseServer.getTables().traders[traderId].dialogue;
|
||||||
|
if (!dialogueTemplates)
|
||||||
|
{
|
||||||
|
this.logger.error(`Unable to deliver items as trader ${traderId} has no "dialogue" data`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
const messageId = this.randomUtil.getArrayValue(dialogueTemplates.itemsDelivered);
|
const messageId = this.randomUtil.getArrayValue(dialogueTemplates.itemsDelivered);
|
||||||
const messageStoreTime = this.timeUtil.getHoursAsSeconds(this.traderConfig.fence.btrDeliveryExpireHours);
|
const messageStoreTime = this.timeUtil.getHoursAsSeconds(this.traderConfig.fence.btrDeliveryExpireHours);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user