From 4c5f3eb1c2c71785b8ac965e785d9a2e130efeb4 Mon Sep 17 00:00:00 2001 From: Raymond Date: Sun, 12 Sep 2021 17:22:39 -0400 Subject: [PATCH] show dataKind failure in xldata --- Dalamud/Interface/Internal/Windows/DataWindow.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dalamud/Interface/Internal/Windows/DataWindow.cs b/Dalamud/Interface/Internal/Windows/DataWindow.cs index 9963d55f2..22a4ed7ca 100644 --- a/Dalamud/Interface/Internal/Windows/DataWindow.cs +++ b/Dalamud/Interface/Internal/Windows/DataWindow.cs @@ -165,9 +165,9 @@ namespace Dalamud.Interface.Internal.Windows }; dataKind = dataKind.Replace(" ", string.Empty).ToLower(); - var matched = Enum.GetValues(typeof(DataKind)) - .Cast() - .Where(k => Enum.GetName(typeof(DataKind), k).Replace("_", string.Empty).ToLower() == dataKind) + + var matched = Enum.GetValues() + .Where(kind => Enum.GetName(kind).Replace("_", string.Empty).ToLower() == dataKind) .FirstOrDefault(); if (matched != default) @@ -176,7 +176,7 @@ namespace Dalamud.Interface.Internal.Windows } else { - Service.Get().PrintError("/xldata: Invalid Data Type"); + Service.Get().PrintError($"/xldata: Invalid data type {dataKind}"); } }