display specific bags like (quiver, ammo pouch, soulbag) separately when viewing other characters bag
This commit is contained in:
@@ -23,10 +23,19 @@ end
|
||||
|
||||
-- Scan a single bag
|
||||
function BagScanner:ScanBag(bagID)
|
||||
-- Determine bag type
|
||||
local bagType = "regular"
|
||||
if addon.Modules.Utils:IsSoulBag(bagID) then
|
||||
bagType = "soul"
|
||||
elseif addon.Modules.Utils:IsAmmoQuiverBag(bagID) then
|
||||
bagType = "ammo"
|
||||
end
|
||||
|
||||
local bag = {
|
||||
slots = {},
|
||||
numSlots = addon.Modules.Utils:GetBagSlotCount(bagID),
|
||||
freeSlots = 0,
|
||||
bagType = bagType,
|
||||
}
|
||||
|
||||
if not addon.Modules.Utils:IsBagValid(bagID) then
|
||||
|
||||
@@ -26,10 +26,19 @@ end
|
||||
|
||||
-- Scan a single bank bag
|
||||
function BankScanner:ScanBankBag(bagID)
|
||||
-- Determine bag type
|
||||
local bagType = "regular"
|
||||
if addon.Modules.Utils:IsSoulBag(bagID) then
|
||||
bagType = "soul"
|
||||
elseif addon.Modules.Utils:IsAmmoQuiverBag(bagID) then
|
||||
bagType = "ammo"
|
||||
end
|
||||
|
||||
local bag = {
|
||||
slots = {},
|
||||
numSlots = addon.Modules.Utils:GetBagSlotCount(bagID),
|
||||
freeSlots = 0,
|
||||
bagType = bagType,
|
||||
}
|
||||
|
||||
if not addon.Modules.Utils:IsBagValid(bagID) then
|
||||
|
||||
+18
-2
@@ -198,9 +198,25 @@ function BagFrame:DisplayItems(bagData, isOtherChar, charName)
|
||||
for _, bagID in ipairs(addon.Constants.BAGS) do
|
||||
-- Skip hidden bags
|
||||
if not hiddenBags[bagID] then
|
||||
if addon.Modules.Utils:IsSoulBag(bagID) then
|
||||
local bagType
|
||||
if isOtherChar then
|
||||
-- For other characters, use saved bag type
|
||||
local bag = bagData[bagID]
|
||||
bagType = bag and bag.bagType or "regular"
|
||||
else
|
||||
-- For current character, detect bag type in real-time
|
||||
if addon.Modules.Utils:IsSoulBag(bagID) then
|
||||
bagType = "soul"
|
||||
elseif addon.Modules.Utils:IsAmmoQuiverBag(bagID) then
|
||||
bagType = "ammo"
|
||||
else
|
||||
bagType = "regular"
|
||||
end
|
||||
end
|
||||
|
||||
if bagType == "soul" then
|
||||
table.insert(soulBags, bagID)
|
||||
elseif addon.Modules.Utils:IsAmmoQuiverBag(bagID) then
|
||||
elseif bagType == "ammo" then
|
||||
table.insert(ammoQuiverBags, bagID)
|
||||
else
|
||||
table.insert(regularBags, bagID)
|
||||
|
||||
Reference in New Issue
Block a user