Sort wishlist items by dungeon

Wishlist items now grouped together by the the dungeon they drop in. Extra info line used to show the specific boss that drops the item.
This commit is contained in:
Jessica Wyatt
2025-09-11 19:50:34 +01:00
parent fdd6f2da81
commit 0c14f04410
2 changed files with 32 additions and 1 deletions
+16
View File
@@ -1320,7 +1320,23 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
end end
end end
end end
if wishDataSource == "AtlasLootItems" then
-- Set boss
if wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) then
for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do
if dataSource[dataID][i][1] == v[1] then
local boss = AtlasLoot_GetWishListSubheadingBoss(wishDataID)
if boss then
extraFrame:SetText(extra .. " - "..boss)
end
end
end
end
end
end end
--For convenience, we store information about the objects in the objects so that it can be easily accessed later --For convenience, we store information about the objects in the objects so that it can be easily accessed later
itemButton.itemID = dataSource[dataID][i][1]; itemButton.itemID = dataSource[dataID][i][1];
itemButton.itemIDName = dataSource[dataID][i][3]; itemButton.itemIDName = dataSource[dataID][i][3];
+16 -1
View File
@@ -214,6 +214,21 @@ function GetLootTableParent(dataID)
return parentID; return parentID;
end end
local function GetWishListSubheadingDungeon(dataID)
if not AtlasLoot_TableNames then return end
local zoneID ;
for i, v in pairs(AtlasLoot_TableNamesBoss) do
for j,k in pairs(v) do
if dataID == j then
zoneID = i
break;
end
end
end
return zoneID;
end
--[[ --[[
AtlasLoot_CategorizeWishList(wlTable): AtlasLoot_CategorizeWishList(wlTable):
Group items with zone/event name etc, and format them by adding subheadings and empty lines Group items with zone/event name etc, and format them by adding subheadings and empty lines
@@ -228,7 +243,7 @@ function AtlasLoot_CategorizeWishList(wlTable)
local _, _, dataID = strfind(v[5], "^(.+)|.+"); local _, _, dataID = strfind(v[5], "^(.+)|.+");
-- Build subheading table -- Build subheading table
if not subheadings[dataID] then if not subheadings[dataID] then
subheadings[dataID] = AtlasLoot_GetWishListSubheadingBoss(dataID); subheadings[dataID] = GetWishListSubheadingDungeon(dataID); -- AtlasLoot_GetWishListSubheadingBoss(dataID);
-- If search failed, replace ID like "Aldor2" to "Aldor1" and try again -- If search failed, replace ID like "Aldor2" to "Aldor1" and try again
if not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then if not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then
subheadings[dataID] = AtlasLoot_GetWishListSubheading(string.sub(dataID, 1, string.len(dataID) - 1).."1"); subheadings[dataID] = AtlasLoot_GetWishListSubheading(string.sub(dataID, 1, string.len(dataID) - 1).."1");