Skip to content

Commit

Permalink
Use Single() in place of erroneous accessor for dialog titles
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Apr 10, 2022
1 parent 4fb9f5c commit 3e0b86e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EndlessClient/Dialogs/QuestDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Optional;
using System;
using System.Collections.Generic;
using System.Linq;
using XNAControls;

namespace EndlessClient.Dialogs
Expand Down Expand Up @@ -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]}";

Expand Down

0 comments on commit 3e0b86e

Please sign in to comment.