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:
@@ -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];
|
||||
|
||||
+16
-1
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user