From 03d14c477cd1bd82c658a5e2263c9d9a34caa38b Mon Sep 17 00:00:00 2001 From: merstrax Date: Thu, 11 Aug 2022 00:33:20 -0400 Subject: [PATCH] -More LootButton Fixes - Crafting and Spells should work --- AtlasLoot/Core/LootButtons.lua | 8 +++++++- AtlasLoot/Core/Search.lua | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AtlasLoot/Core/LootButtons.lua b/AtlasLoot/Core/LootButtons.lua index 50e8d06..68349ee 100644 --- a/AtlasLoot/Core/LootButtons.lua +++ b/AtlasLoot/Core/LootButtons.lua @@ -275,7 +275,13 @@ function AtlasLootItem_OnClick(self ,arg1) else spellName, _, _, _, _, _, _, _, _ = GetSpellInfo(string.sub(self.itemID, 2)); --spellIcon = GetItemIcon(self.dressingroomID); - AtlasLoot_ShowWishListDropDown(self.itemID, self.dressingroomID, "=ds="..spellName, AtlasLoot_BossName:GetText(), self.dataID .. "|" .. "AtlasLoot_Data" .. "|" .. tostring(self.tablenum), self); + if(AtlasLootItemsFrame.refresh[1] == "SearchResult") then + local datID, _, datPage = strsplit("|", self.sourcePage); + AtlasLoot_ShowWishListDropDown(self.itemID, self.dressingroomID, "=ds="..spellName, + AtlasLoot_Data[datID][tonumber(datPage)].Name, self.sourcePage, self); + else + AtlasLoot_ShowWishListDropDown(self.itemID, self.dressingroomID, "=ds="..spellName, AtlasLoot_BossName:GetText(), self.dataID .. "|" .. "AtlasLoot_Data" .. "|" .. tostring(self.tablenum), self); + end end elseif(IsControlKeyDown()) then DressUpItemLink("item:"..self.dressingroomID..":0:0:0:0:0:0:0"); diff --git a/AtlasLoot/Core/Search.lua b/AtlasLoot/Core/Search.lua index cb8e77f..a50ba3e 100644 --- a/AtlasLoot/Core/Search.lua +++ b/AtlasLoot/Core/Search.lua @@ -682,7 +682,7 @@ local function DoSearch(searchText) local spellName = GetSpellName(itemId, atlasName) if nameMatches(spellName, searchText) then spellName = string.sub(atlasName, 1, 4) .. spellName; - AddItemToSearchResult(itemId, itemType, spellName, dataID, itemIdBackup) + AddItemToSearchResult(itemId, itemType, spellName, dataID, itemIdBackup, AtlasLoot_Difficulty:getMaxDifficulty(data.Type), dataPage); end end end