from retail

This commit is contained in:
NoM0Re
2025-02-25 21:47:56 +01:00
parent 2157fbc553
commit c48ce524f8
6 changed files with 68 additions and 23 deletions
+9 -1
View File
@@ -648,7 +648,15 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
local icon = spellCache.GetIcon(value);
return icon and tostring(icon) or "", 18, 18;
elseif(arg.type == "spell") then
local _, _, icon = GetSpellInfo(value);
local spellName, _, icon = GetSpellInfo(value);
if arg.noValidation then
-- GetSpellInfo and other wow apis are case insensitive, but the later matching we do
-- isn't. For validted inputs, we automatically correct the casing via GetSpellName
-- Since we don't do that for noValidation, we are extra picky on the input
if type(value) == "string" and spellName ~= value then
return "", 18, 18
end
end
return icon and tostring(icon) or "", 18, 18;
elseif(arg.type == "item") then
local _, _, _, _, _, _, _, _, _, icon = GetItemInfo(value);