from retail

This commit is contained in:
NoM0Re
2025-01-18 17:23:16 +01:00
parent bd46c605bd
commit f72e96ae6e
7 changed files with 149 additions and 48 deletions
+18 -13
View File
@@ -31,19 +31,6 @@ local function ConstructIconPicker(frame)
local function iconPickerFill(subname, doSort)
scroll:ReleaseChildren();
-- Work around special numbers such as inf and nan
if (tonumber(subname)) then
local spellId = tonumber(subname);
if (abs(spellId) < math.huge and tostring(spellId) ~= "nan") then
subname = GetSpellInfo(spellId or 0)
end
end
if subname then
subname = subname:lower();
end
local usedIcons = {};
local AddButton = function(name, icon)
local button = AceGUI:Create("WeakAurasIconButton");
@@ -57,6 +44,24 @@ local function ConstructIconPicker(frame)
usedIcons[icon] = true;
end
-- Work around special numbers such as inf and nan
if (tonumber(subname)) then
local spellId = tonumber(subname);
if (abs(spellId) < math.huge and tostring(spellId) ~= "nan") then
local name, _, icon = GetSpellInfo(spellId)
if name and icon then
AddButton(name, icon)
end
return;
end
end
if subname then
subname = subname:lower();
end
local num = 0;
if(subname and subname ~= "") then
for name, icons in pairs(spellCache.Get()) do