From 28a56519d1f43a7e1d82b49d85b8af814b8d977d Mon Sep 17 00:00:00 2001 From: BoroBongo Date: Sun, 22 Nov 2026 02:07:23 +0000 Subject: [PATCH] fix: important dialog infos are never an empty choice - the NPC says them one after another (G2: Hanna) Like the engine, an important info (no description) isn't listed as an option for the hero; after one important info ends, the next available one starts by itself, not only when the dialog opens. A permanent important info still only starts at the dialog start, otherwise it would repeat forever. Important infos were already checked in nr order. --- .../Scripts/Services/Player/DialogService.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Assets/Gothic-Core/Scripts/Services/Player/DialogService.cs b/Assets/Gothic-Core/Scripts/Services/Player/DialogService.cs index c1c8f2378..e671041c4 100644 --- a/Assets/Gothic-Core/Scripts/Services/Player/DialogService.cs +++ b/Assets/Gothic-Core/Scripts/Services/Player/DialogService.cs @@ -138,9 +138,16 @@ public void StartDialog(NpcContainer npcContainer, bool initialDialogStarting) _gameStateService.Dialogs.IsChoosing = true; _gameStateService.Dialogs.ExitInfo = null; } - // There is at least one important entry, the NPC wants to talk to the hero about. - else if (initialDialogStarting && TryGetImportant(npcContainer, out var infoInstance)) + // There is at least one important entry, the NPC wants to talk to the hero about. Like the engine, after + // one important info the next one starts by itself (G2 Hanna: her greeting, then the thieves' cellar one), + // not only when the dialog starts. A permanent important info only at the start - it would repeat forever. + else if (TryGetImportant(npcContainer, out var infoInstance) && + (initialDialogStarting || infoInstance.Permanent != 1)) { + if (!initialDialogStarting) + Logger.Log($"[Dialog] {npcContainer.Instance.GetName(NpcNameSlot.Slot0)}: next important info " + + $"{infoInstance.Index} (nr {infoInstance.Nr}) starts by itself", LogCat.Dialog); + _gameStateService.Dialogs.CurrentInstance = infoInstance; CallMainInformation(npcContainer, infoInstance); } @@ -164,6 +171,15 @@ public void StartDialog(NpcContainer npcContainer, bool initialDialogStarting) continue; } + // Important infos are the NPC's to start, never a choice for the hero: they have no description + // and showed up as an empty option (G2 Hanna's cellar info). + if (dialog.Important == 1) + { + Logger.Log($"[Dialog] {npcContainer.Instance.GetName(NpcNameSlot.Slot0)}: important info " + + $"{dialog.Index} (nr {dialog.Nr}) is not a choice", LogCat.Dialog); + continue; + } + // We can now add the dialog selectableDialogs.Add(dialog); }