From 0c14f044107335e5dae7bf514ec9bfc6d36a7848 Mon Sep 17 00:00:00 2001 From: Jessica Wyatt Date: Thu, 11 Sep 2025 19:50:34 +0100 Subject: [PATCH 1/2] 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. --- Core/AtlasLoot.lua | 16 ++++++++++++++++ Core/WishList.lua | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Core/AtlasLoot.lua b/Core/AtlasLoot.lua index 08c0626..bfdbc3d 100644 --- a/Core/AtlasLoot.lua +++ b/Core/AtlasLoot.lua @@ -1320,7 +1320,23 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) 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 + --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.itemIDName = dataSource[dataID][i][3]; diff --git a/Core/WishList.lua b/Core/WishList.lua index 44bd452..11aebb2 100644 --- a/Core/WishList.lua +++ b/Core/WishList.lua @@ -214,6 +214,21 @@ function GetLootTableParent(dataID) return parentID; 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): 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], "^(.+)|.+"); -- Build subheading table 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 not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then subheadings[dataID] = AtlasLoot_GetWishListSubheading(string.sub(dataID, 1, string.len(dataID) - 1).."1"); From 8491f38e6e92e2ded2b8344ab4015e32841fdc5d Mon Sep 17 00:00:00 2001 From: Jessica Wyatt Date: Fri, 12 Sep 2025 01:04:58 +0100 Subject: [PATCH 2/2] Configurable wishlist layout --- Core/AtlasLoot.lua | 19 ++++++++++++++++++- Core/AtlasLoot.xml | 24 +++++++++++++++++++++--- Core/WishList.lua | 6 +++++- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/Core/AtlasLoot.lua b/Core/AtlasLoot.lua index bfdbc3d..0ad6b85 100644 --- a/Core/AtlasLoot.lua +++ b/Core/AtlasLoot.lua @@ -341,6 +341,7 @@ function AtlasLootOptions_Init() AtlasLootOptionsFrameLootlinkTT:SetChecked(AtlasLootCharDB.LootlinkTT); AtlasLootOptionsFrameItemSyncTT:SetChecked(AtlasLootCharDB.ItemSyncTT); AtlasLootOptionsFrameShowSource:SetChecked(AtlasLootCharDB.ShowSource); + AtlasLootOptionsFrameWishlistGroupedByDungeon:SetChecked(AtlasLootCharDB.WishlistGroupedByDungeon); AtlasLootOptionsFrameEquipCompare:SetChecked(AtlasLootCharDB.EquipCompare); AtlasLootOptionsFrameOpaque:SetChecked(AtlasLootCharDB.Opaque); AtlasLootOptionsFrameItemID:SetChecked(AtlasLootCharDB.ItemIDs); @@ -369,6 +370,7 @@ function AtlasLootOptions_Fresh() AtlasLootCharDB.LootlinkTT = false; AtlasLootCharDB.ItemSyncTT = false; AtlasLootCharDB.ShowSource = true; + AtlasLootCharDB.WishlistGroupedByDungeon = true; AtlasLootCharDB.EquipCompare = false; AtlasLootCharDB.Opaque = false; AtlasLootCharDB.ItemIDs = false; @@ -880,6 +882,21 @@ function AtlasLootOptions_ShowSourceToggle() AtlasLootOptions_Init(); end +function AtlasLootOptions_WishlistGroupedByDungeonToggle() + if(AtlasLootCharDB.WishlistGroupedByDungeon) then + AtlasLootCharDB.WishlistGroupedByDungeon = false; + else + AtlasLootCharDB.WishlistGroupedByDungeon = true; + end + AtlasLootOptions_Init(); + AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootCharDB["WishList"]); + local dataID = AtlasLootItemsFrame.refresh[1]; + + if (dataID == 'WishList') then + AtlasLoot_ShowWishList(); + end +end + --[[ AtlasLootOptions_EquipCompareToggle: Toggles EquipCompare. Adds a tooltip with the equipped item (if it's the case) next to the default one. @@ -1321,7 +1338,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) end end - if wishDataSource == "AtlasLootItems" then + if wishDataSource == "AtlasLootItems" and AtlasLootCharDB.WishlistGroupedByDungeon then -- Set boss if wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) then for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do diff --git a/Core/AtlasLoot.xml b/Core/AtlasLoot.xml index 4326c4f..8387d20 100644 --- a/Core/AtlasLoot.xml +++ b/Core/AtlasLoot.xml @@ -1366,7 +1366,7 @@ - + @@ -1516,7 +1516,7 @@ - + @@ -1524,6 +1524,24 @@ + + + local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); + getglobal(this:GetName().."Text"):SetText("Group wishlist by dungeon"); + + + AtlasLootOptions_WishlistGroupedByDungeonToggle(); + + + + + + + + + + + local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -1538,7 +1556,7 @@ - + diff --git a/Core/WishList.lua b/Core/WishList.lua index 11aebb2..93b91e4 100644 --- a/Core/WishList.lua +++ b/Core/WishList.lua @@ -243,7 +243,11 @@ function AtlasLoot_CategorizeWishList(wlTable) local _, _, dataID = strfind(v[5], "^(.+)|.+"); -- Build subheading table if not subheadings[dataID] then - subheadings[dataID] = GetWishListSubheadingDungeon(dataID); -- AtlasLoot_GetWishListSubheadingBoss(dataID); + if AtlasLootCharDB.WishlistGroupedByDungeon then + subheadings[dataID] = GetWishListSubheadingDungeon(dataID); + else + subheadings[dataID] = AtlasLoot_GetWishListSubheadingBoss(dataID); + end -- If search failed, replace ID like "Aldor2" to "Aldor1" and try again if not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then subheadings[dataID] = AtlasLoot_GetWishListSubheading(string.sub(dataID, 1, string.len(dataID) - 1).."1");