fix: class items
This commit is contained in:
@@ -57,14 +57,15 @@ local CATEGORY_ORDER = {
|
|||||||
["Weapon"] = 4, -- Non-equippable weapons
|
["Weapon"] = 4, -- Non-equippable weapons
|
||||||
["Armor"] = 5, -- Non-equippable armor
|
["Armor"] = 5, -- Non-equippable armor
|
||||||
["Tools"] = 6,
|
["Tools"] = 6,
|
||||||
["Quiver"] = 7,
|
["Class Items"] = 7,
|
||||||
["Reagent"] = 8,
|
["Quiver"] = 8,
|
||||||
["Trade Goods"] = 9,
|
["Reagent"] = 9,
|
||||||
["Recipe"] = 10,
|
["Trade Goods"] = 10,
|
||||||
["Container"] = 11,
|
["Recipe"] = 11,
|
||||||
["Quest"] = 12,
|
["Container"] = 12,
|
||||||
["Key"] = 13,
|
["Quest"] = 13,
|
||||||
["Miscellaneous"] = 14,
|
["Key"] = 14,
|
||||||
|
["Miscellaneous"] = 15,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Subclass ordering for grouping related items
|
-- Subclass ordering for grouping related items
|
||||||
|
|||||||
+10
-3
@@ -403,7 +403,7 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
|
|||||||
-- Group items by category
|
-- Group items by category
|
||||||
local categories = {}
|
local categories = {}
|
||||||
local categoryList = {
|
local categoryList = {
|
||||||
"Weapon", "Armor", "Consumable", "Food", "Drink", "Quest", "Trade Goods", "Reagent", "Recipe", "Quiver", "Container", "Soul Bag", "Keyring", "Miscellaneous"
|
"Weapon", "Armor", "Consumable", "Food", "Drink", "Class Items", "Quest", "Trade Goods", "Reagent", "Recipe", "Quiver", "Container", "Soul Bag", "Keyring", "Miscellaneous"
|
||||||
}
|
}
|
||||||
for _, cat in ipairs(categoryList) do categories[cat] = {} end
|
for _, cat in ipairs(categoryList) do categories[cat] = {} end
|
||||||
|
|
||||||
@@ -438,11 +438,18 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
|
|||||||
itemName == "Blood Scythe" then
|
itemName == "Blood Scythe" then
|
||||||
table.insert(specialItems.Tools, {bagID = bagID, slotID = slotID, itemData = itemData})
|
table.insert(specialItems.Tools, {bagID = bagID, slotID = slotID, itemData = itemData})
|
||||||
|
|
||||||
-- Priority 2: Quest Items
|
-- Priority 2: Class Items (Soul Shards, Arrows, Bullets)
|
||||||
|
elseif addon.Modules.Utils:IsSoulShard(itemData.link) or
|
||||||
|
itemData.class == "Projectile" or
|
||||||
|
itemData.subclass == "Arrow" or
|
||||||
|
itemData.subclass == "Bullet" then
|
||||||
|
table.insert(categories["Class Items"], {bagID = bagID, slotID = slotID, itemData = itemData})
|
||||||
|
|
||||||
|
-- Priority 3: Quest Items
|
||||||
elseif (not isOtherChar and addon.Modules.Utils:IsQuestItemTooltip(bagID, slotID)) or itemData.class == "Quest" then
|
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})
|
table.insert(categories["Quest"], {bagID = bagID, slotID = slotID, itemData = itemData})
|
||||||
|
|
||||||
-- Priority 3: Food and Drink
|
-- Priority 4: Food and Drink
|
||||||
elseif itemData.class == "Consumable" then
|
elseif itemData.class == "Consumable" then
|
||||||
cat = "Consumable"
|
cat = "Consumable"
|
||||||
local sub = itemData.subclass or ""
|
local sub = itemData.subclass or ""
|
||||||
|
|||||||
+12
-3
@@ -255,7 +255,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
|
|||||||
-- Group items by category
|
-- Group items by category
|
||||||
local categories = {}
|
local categories = {}
|
||||||
local categoryList = {
|
local categoryList = {
|
||||||
"Weapon", "Armor", "Consumable", "Food", "Drink", "Quest", "Trade Goods", "Reagent", "Recipe", "Quiver", "Container", "Soul Bag", "Miscellaneous"
|
"Weapon", "Armor", "Consumable", "Food", "Drink", "Class Items", "Quest", "Trade Goods", "Reagent", "Recipe", "Quiver", "Container", "Soul Bag", "Miscellaneous"
|
||||||
}
|
}
|
||||||
for _, cat in ipairs(categoryList) do categories[cat] = {} end
|
for _, cat in ipairs(categoryList) do categories[cat] = {} end
|
||||||
|
|
||||||
@@ -291,11 +291,20 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Priority 2: Quest Items
|
-- Priority 2: Class Items (Soul Shards, Arrows, Bullets)
|
||||||
|
if addon.Modules.Utils:IsSoulShard(itemData.link) or
|
||||||
|
itemData.class == "Projectile" or
|
||||||
|
itemData.subclass == "Arrow" or
|
||||||
|
itemData.subclass == "Bullet" then
|
||||||
|
table.insert(categories["Class Items"], {bagID = bagID, slotID = slotID, itemData = itemData})
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Priority 3: Quest Items
|
||||||
if (not isOtherChar and addon.Modules.Utils:IsQuestItemTooltip(bagID, slotID)) or itemData.class == "Quest" then
|
if (not isOtherChar and addon.Modules.Utils:IsQuestItemTooltip(bagID, slotID)) or itemData.class == "Quest" then
|
||||||
cat = "Quest"
|
cat = "Quest"
|
||||||
|
|
||||||
-- Priority 3: Food and Drink
|
-- Priority 4: Food and Drink
|
||||||
elseif itemData.class == "Consumable" then
|
elseif itemData.class == "Consumable" then
|
||||||
cat = "Consumable"
|
cat = "Consumable"
|
||||||
local sub = itemData.subclass or ""
|
local sub = itemData.subclass or ""
|
||||||
|
|||||||
Reference in New Issue
Block a user