From 3e0b86e6bb54e560deafee8dbc9460e26b9b9b0f Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Sun, 10 Apr 2022 16:23:36 -0700 Subject: [PATCH] Use Single() in place of erroneous accessor for dialog titles --- EndlessClient/Dialogs/QuestDialog.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EndlessClient/Dialogs/QuestDialog.cs b/EndlessClient/Dialogs/QuestDialog.cs index fd53c5132..ed5fcfb72 100644 --- a/EndlessClient/Dialogs/QuestDialog.cs +++ b/EndlessClient/Dialogs/QuestDialog.cs @@ -9,6 +9,7 @@ using Optional; using System; using System.Collections.Generic; +using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -86,7 +87,7 @@ private void UpdateTitle(IQuestDialogData repoData) var npcName = _enfFileProvider.ENFFile[_questDataProvider.RequestedNPC.ID].Name; var titleText = npcName; if (!repoData.DialogTitles.ContainsKey(repoData.VendorID) && repoData.DialogTitles.Count == 1) - titleText += $" - {repoData.DialogTitles[0]}"; + titleText += $" - {repoData.DialogTitles.Single().Value}"; else if (repoData.DialogTitles.ContainsKey(repoData.VendorID)) titleText += $" - {repoData.DialogTitles[repoData.VendorID]}";