From 437c8b973c4cd5800ed36edd6e7a455573fb7933 Mon Sep 17 00:00:00 2001 From: Rvng Date: Mon, 27 Sep 2021 16:43:35 -0400 Subject: [PATCH] Added dif text to search, cleanup --- AtlasLoot/Core/Search.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/AtlasLoot/Core/Search.lua b/AtlasLoot/Core/Search.lua index e300b9f..49e5f0e 100644 --- a/AtlasLoot/Core/Search.lua +++ b/AtlasLoot/Core/Search.lua @@ -454,14 +454,14 @@ function AtlasLoot:Search(Text) for dataID, data in pairs(AtlasLoot_Data) do local queryDifficulties = 1; - local maxDifficulties = 1; + local maxDifficulties = 2; if data.Type ~= nil then queryDifficulties = 0; maxDifficulties = 4; end - for dif = 1, maxDifficulties do + for dif = 2, maxDifficulties do for _, v in ipairs(data) do local _id = AL_FindId(gsub(v[4], "=q%d=", ""), dif + queryDifficulties) or v[2] if type(_id) == "number" and _id > 0 then @@ -528,7 +528,7 @@ function AtlasLoot:Search(Text) local _, _, quality = string.find(v[4], "=q(%d)="); if quality then itemName = "=q"..quality.."="..itemName end if AtlasLoot_TableNames[dataID] then lootpage = AtlasLoot_TableNames[dataID][1]; else lootpage = "Argh!"; end - table.insert(AtlasLootCharDB["SearchResult"], { 0, _id, v[3], itemName, lootpage, "", "", dataID.."|".."\"\"" }); + table.insert(AtlasLootCharDB["SearchResult"], { 0, _id, v[3], itemName, lootpage..", "..GREEN..AL_Dif.Dungeon[dif], "", "", dataID.."|".."\"\"" }); end elseif (v[2] ~= nil) and (v[2] ~= "") and (string.sub(v[2], 1, 1) == "s") then local spellName = GetSpellInfo(string.sub(v[2], 2)); @@ -662,8 +662,5 @@ function AtlasLoot:GetSearchResultPage(page) k=k+1; end - result.Type = "Dungeon"; - result.Dif = GetDifficultyTier(); - return result, pageMax; end