Handle null npcEntityId in setRuntimeDialogue

This commit is contained in:
2026-04-15 09:34:51 +02:00
parent 4f84742d25
commit 1f43875711

View File

@@ -760,12 +760,18 @@ export class RuntimeHost {
}
this.setRuntimeDialogue(
this.createRuntimeNpcDialogueState(
this.currentDialogue.npcEntityId,
dialogue.id,
nextLineIndex,
this.currentDialogue.source
)
this.currentDialogue.npcEntityId === null
? this.createRuntimeDialogueState(
dialogue.id,
nextLineIndex,
this.currentDialogue.source
)
: this.createRuntimeNpcDialogueState(
this.currentDialogue.npcEntityId,
dialogue.id,
nextLineIndex,
this.currentDialogue.source
)
);
}