Skip to content

Commit

Permalink
Update BagTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
doadin committed May 29, 2024
1 parent 49b0c00 commit 826f528
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
7 changes: 5 additions & 2 deletions Baggins-Filtering.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ local tinsert, tsort =
local BANK_CONTAINER = _G.BANK_CONTAINER
local BACKPACK_CONTAINER = _G.BACKPACK_CONTAINER
local REAGENTBANK_CONTAINER = _G.REAGENTBANK_CONTAINER
local KEYRING_CONTAINER = Enum.BagIndex.Keyring
local REAGENT_CONTAINER = Baggins:IsRetailWow() and Enum.BagIndex.ReagentBag or math.huge
local NUM_BAG_SLOTS = _G.NUM_TOTAL_EQUIPPED_BAG_SLOTS or _G.NUM_BAG_SLOTS
local NUM_BANKBAGSLOTS = _G.NUM_BANKBAGSLOTS

Expand Down Expand Up @@ -56,14 +58,15 @@ local function BuildBagTypes()
end

-- Classic specific bag
if Baggins:IsClassicWow() or Baggins:IsTBCWow() or Baggins:IsWrathWow() or Baggins:IsCataWow() then
if Baggins:IsClassicWow() or Baggins:IsTBCWow() or Baggins:IsWrathWow() then
BagTypes[KEYRING_CONTAINER] = 3
end


-- Retail specific bag
if Baggins:IsRetailWow() then
BagTypes[REAGENTBANK_CONTAINER] = 4
BagTypes[REAGENT_CONTAINER] = 5
end

end
Expand Down Expand Up @@ -178,7 +181,7 @@ function Baggins:IsSpecialBag(bag) --luacheck: ignore 212
if BagTypes[bag] == 4 then
return "r"
end
if bag == 5 then
if BagTypes[bag] == 5 then
return "re"
end
if bag>=1 and bag<= 11 then
Expand Down
2 changes: 1 addition & 1 deletion Baggins-ItemOps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for i=0, NUM_BAG_SLOTS do
tinsert(charBags, i);
end

if Baggins:IsClassicWow() or Baggins:IsTBCWow() or Baggins:IsWrathWow() or Baggins:IsCataWow() then
if Baggins:IsClassicWow() or Baggins:IsTBCWow() or Baggins:IsWrathWow() then
tinsert(charBags, KEYRING_CONTAINER)
end

Expand Down
16 changes: 7 additions & 9 deletions src/filters/Empty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ local LibStub = _G.LibStub
local L = LibStub("AceLocale-3.0"):GetLocale(AddOnName)

-- Local storage
local BagTypes = {}
local BagTypes

-- Build list of bag types
local function BuildBagTypes()
Expand All @@ -41,15 +41,13 @@ local function BuildBagTypes()

end

-- Classic specific bag
--[===[@non-retail@
BagTypes[KEYRING_CONTAINER] = 3
--@end-non-retail@]===]
if AddOn:IsClassicWow() or AddOn:IsTBCWow() or AddOn:IsWrathWow() then
BagTypes[KEYRING_CONTAINER] = 3
end

-- Retail specific bag
--@retail@
BagTypes[REAGENTBANK_CONTAINER] = 4
--@end-retail@
if AddOn:IsRetailWow() then
BagTypes[REAGENTBANK_CONTAINER] = 4
end

end

Expand Down

0 comments on commit 826f528

Please sign in to comment.