feat: junk category section

This commit is contained in:
Salikh Gurgenidze
2025-12-24 13:08:43 +04:00
parent d592ed8085
commit 41cf2c44bc
4 changed files with 70 additions and 6 deletions
+6 -2
View File
@@ -415,7 +415,7 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
-- Group items by category
local categories = {}
local categoryList = {
"Weapon", "Armor", "Consumable", "Food", "Drink", "Trade Goods", "Reagent", "Recipe", "Quiver", "Container", "Soul Bag", "Keyring", "Miscellaneous", "Quest", "Class Items"
"Weapon", "Armor", "Consumable", "Food", "Drink", "Trade Goods", "Reagent", "Recipe", "Quiver", "Container", "Soul Bag", "Keyring", "Miscellaneous", "Quest", "Junk", "Class Items"
}
for _, cat in ipairs(categoryList) do categories[cat] = {} end
@@ -469,7 +469,11 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
elseif (not isOtherChar and addon.Modules.Utils:IsQuestItemTooltip(bagID, slotID)) or itemData.class == "Quest" then
table.insert(categories["Quest"], {bagID = bagID, slotID = slotID, itemData = itemData})
-- Priority 4: Food and Drink
-- Priority 4: Junk (Gray items)
elseif itemData.quality == 0 or addon.Modules.Utils:IsItemGrayTooltip(bagID, slotID, itemData.link) then
table.insert(categories["Junk"], {bagID = bagID, slotID = slotID, itemData = itemData})
-- Priority 5: Food and Drink
elseif itemData.class == "Consumable" then
cat = "Consumable"
local sub = itemData.subclass or ""