diff --git a/AdiBags.toc b/AdiBags.toc
index 606d246..a439078 100644
--- a/AdiBags.toc
+++ b/AdiBags.toc
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with AdiBags. If not, see .
-## Interface: 100206
+## Interface: 110000
## Title: AdiBags
## Notes: Adirelle's bag addon.
diff --git a/AdiBags_Cata.toc b/AdiBags_Cata.toc
new file mode 100644
index 0000000..bfa6658
--- /dev/null
+++ b/AdiBags_Cata.toc
@@ -0,0 +1,89 @@
+# AdiBags - Adirelle's bag addon.
+# Copyright 2010-2021 Adirelle (adirelle@gmail.com)
+# All rights reserved.
+#
+# This file is part of AdiBags.
+#
+# AdiBags is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# AdiBags is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with AdiBags. If not, see .
+
+## Interface: 40400
+
+## Title: AdiBags
+## Notes: Adirelle's bag addon.
+## Author: Adirelle
+## Version: @project-version@
+## SavedVariables: AdiBagsDB
+## X-Date: @project-date-iso@
+## X-License: GPL v3
+## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibSharedMedia-3.0, Scrap, BrainDead, SyLevel
+#@alpha@
+## OptionalDeps: AdiDebug, BugSack, Swatter
+#@end-alpha@
+
+#@no-lib-strip@
+libs\LibStub\LibStub.lua
+libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
+libs\AceAddon-3.0\AceAddon-3.0.xml
+libs\AceDB-3.0\AceDB-3.0.xml
+libs\AceHook-3.0\AceHook-3.0.xml
+libs\AceConsole-3.0\AceConsole-3.0.xml
+libs\LibSharedMedia-3.0\lib.xml
+#@end-no-lib-strip@
+
+libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
+
+core\EventHandlers.lua
+core\Boot.lua
+
+Localization.lua
+
+core\Experiments.lua
+core\Fonts.lua
+core\Constants.lua
+core\Utility.lua
+core\Theme.lua
+core\Core.lua
+core\Hooks.lua
+core\Bags.lua
+core\Filters.lua
+core\Layout.lua
+core\OO.lua
+
+widgets\LayeredRegion.lua
+widgets\ContainerFrame.lua
+widgets\BagSlots.lua
+widgets\ItemButton.lua
+widgets\Section.lua
+widgets\AnchorWidget.lua
+
+modules\DataSource.lua
+modules\NewItemTracking.lua
+modules\MoneyFrame.lua
+modules\FilterOverride.lua
+modules\ItemLevel.lua
+modules\Junk.lua
+modules\CurrencyFrame.lua
+modules\TooltipInfo.lua
+modules\SectionVisibilityDropdown.lua
+modules\BankSwitcher.lua
+modules\ChangeHighlight.lua
+modules\Masque.lua
+
+core\ItemDatabase.lua
+core\DefaultFilters.lua
+core\Deprecation.lua
+
+#@debug@
+## Version: DEV
+#@end-debug@
diff --git a/AdiBags_Config/AdiBags_Config.toc b/AdiBags_Config/AdiBags_Config.toc
index f90c3de..2e453d2 100644
--- a/AdiBags_Config/AdiBags_Config.toc
+++ b/AdiBags_Config/AdiBags_Config.toc
@@ -1,4 +1,4 @@
-## Interface: 100206
+## Interface: 110000
## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
diff --git a/AdiBags_Config/AdiBags_Config_Cata.toc b/AdiBags_Config/AdiBags_Config_Cata.toc
new file mode 100644
index 0000000..b74a857
--- /dev/null
+++ b/AdiBags_Config/AdiBags_Config_Cata.toc
@@ -0,0 +1,25 @@
+## Interface: 40400
+
+## Title: AdiBags Configuration
+## Notes: Adirelle's bag addon.
+## Author: Adirelle
+## Version: @project-version@
+## X-Date: @project-date-iso@
+## X-Part-Of: AdiBags
+## LoadOnDemand: 1
+## Dependencies: AdiBags
+## OptionalDeps: AceGUI-3.0-SharedMediaWidgets
+
+#@no-lib-strip@
+..\AdiBags\libs\AceDBOptions-3.0\AceDBOptions-3.0.xml
+..\AdiBags\libs\AceGUI-3.0\AceGUI-3.0.xml
+..\AdiBags\libs\AceConfig-3.0\AceConfig-3.0.xml
+..\AdiBags\libs\AceGUI-3.0-SharedMediaWidgets\widget.xml
+#@end-no-lib-strip@
+
+..\AdiBags\config\Config-ItemList.lua
+..\AdiBags\config\Options.lua
+
+#@debug@
+## Version: DEV
+#@end-debug@
diff --git a/AdiBags_Config/AdiBags_Config_Vanilla.toc b/AdiBags_Config/AdiBags_Config_Vanilla.toc
index 0fa351f..33af37d 100644
--- a/AdiBags_Config/AdiBags_Config_Vanilla.toc
+++ b/AdiBags_Config/AdiBags_Config_Vanilla.toc
@@ -1,4 +1,4 @@
-## Interface: 11404
+## Interface: 11503
## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
diff --git a/AdiBags_Config/AdiBags_Config_Wrath.toc b/AdiBags_Config/AdiBags_Config_Wrath.toc
index 8421374..a896e53 100644
--- a/AdiBags_Config/AdiBags_Config_Wrath.toc
+++ b/AdiBags_Config/AdiBags_Config_Wrath.toc
@@ -1,4 +1,4 @@
-## Interface: 30400
+## Interface: 30403
## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
diff --git a/AdiBags_Vanilla.toc b/AdiBags_Vanilla.toc
index f0dde88..5752e7e 100644
--- a/AdiBags_Vanilla.toc
+++ b/AdiBags_Vanilla.toc
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with AdiBags. If not, see .
-## Interface: 11500
+## Interface: 11503
## Title: AdiBags
## Notes: Adirelle's bag addon.
diff --git a/AdiBags_Wrath.toc b/AdiBags_Wrath.toc
index 6f850c9..2dd61cd 100644
--- a/AdiBags_Wrath.toc
+++ b/AdiBags_Wrath.toc
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with AdiBags. If not, see .
-## Interface: 30401
+## Interface: 30403
## Title: AdiBags
## Notes: Adirelle's bag addon.
diff --git a/config/Config-ItemList.lua b/config/Config-ItemList.lua
index 3197b16..d87d9c7 100644
--- a/config/Config-ItemList.lua
+++ b/config/Config-ItemList.lua
@@ -29,7 +29,7 @@ local ClearCursor = _G.ClearCursor
local CreateFrame = _G.CreateFrame
local GameTooltip = _G.GameTooltip
local GetCursorInfo = _G.GetCursorInfo
-local GetItemInfo = _G.GetItemInfo
+local GetItemInfo = _G.C_Item.GetItemInfo
local pairs = _G.pairs
local PickupItem = _G.PickupItem
local PlaySound = _G.PlaySound
diff --git a/core/Bags.lua b/core/Bags.lua
index 1be97f2..fa2dc82 100644
--- a/core/Bags.lua
+++ b/core/Bags.lua
@@ -28,7 +28,7 @@ local BankFrame = _G.BankFrame
local OpenAllBags = _G.OpenAllBags
local CloseAllBags = _G.CloseAllBags
local IsBagOpen = _G.IsBagOpen
-local CloseBankFrame = _G.CloseBankFrame
+local CloseBankFrame = C_Bank and _G.C_Bank.CloseBankFrame or _G.CloseBankFrame
local SortBags = C_Container and _G.C_Container.SortBags or _G.SortBags
local SortBankBags = C_Container and _G.C_Container.SortBankBags or _G.SortBankBags
local SortReagentBankBags = C_Container and _G.C_Container.SortReagentBankBags or _G.SortReagentBankBags
diff --git a/core/Constants.lua b/core/Constants.lua
index c95bda4..f4970b0 100644
--- a/core/Constants.lua
+++ b/core/Constants.lua
@@ -29,6 +29,7 @@ addon.isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
addon.isClassic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
addon.isBCC = WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
addon.isWrath = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
+addon.isCata = WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC
--
diff --git a/core/Core.lua b/core/Core.lua
index 58fc13f..9be1410 100644
--- a/core/Core.lua
+++ b/core/Core.lua
@@ -35,8 +35,8 @@ local CreateFrame = _G.CreateFrame
local format = _G.format
local GetCVarBool = _G.GetCVarBool
local geterrorhandler = _G.geterrorhandler
-local InterfaceOptions_AddCategory = _G.InterfaceOptions_AddCategory
-local LoadAddOn = _G.LoadAddOn
+local Settings = _G.Settings
+local LoadAddOn = _G.C_AddOns.LoadAddOn
local next = _G.next
local NUM_BANKGENERIC_SLOTS = _G.NUM_BANKGENERIC_SLOTS
local pairs = _G.pairs
@@ -309,7 +309,7 @@ do
-- Create the Blizzard addon option frame
local panel = CreateFrame("Frame", addonName.."BlizzOptions")
panel.name = addonName
- InterfaceOptions_AddCategory(panel)
+ Settings.RegisterAddOnCategory(Settings.RegisterCanvasLayoutCategory(panel, addonName))
local fs = panel:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
fs:SetPoint("TOPLEFT", 10, -15)
diff --git a/core/DefaultFilters.lua b/core/DefaultFilters.lua
index c445469..d786169 100644
--- a/core/DefaultFilters.lua
+++ b/core/DefaultFilters.lua
@@ -34,6 +34,8 @@ function addon:SetupDefaultFilters()
local GetItemIDs = _G.C_EquipmentSet.GetItemIDs
local GetEquipmentSetIDs = _G.C_EquipmentSet.GetEquipmentSetIDs
local GetItemLocations = _G.C_EquipmentSet.GetItemLocations
+ local GetItemClassInfo = _G.C_Item.GetItemClassInfo
+ local GetItemSubClassInfo = _G.C_Item.GetItemSubClassInfo
local pairs = _G.pairs
local wipe = _G.wipe
--GLOBALS>
diff --git a/core/Deprecation.lua b/core/Deprecation.lua
index f376650..9e1c681 100644
--- a/core/Deprecation.lua
+++ b/core/Deprecation.lua
@@ -6,9 +6,9 @@ local addon = LibStub('AceAddon-3.0'):GetAddon(addonName)
-- remove this call from Core.lua in OnInitialize.
function addon:Deprecation()
if addon.db.profile.deprecationPhase < 2 then
- print("AdiBags is deprecated and will get no new feature releases.")
- print("Please consider switching to AdiBags' successor, BetterBags.")
- print("BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags")
+ local prefix = "|cFF8ADCFF"..addonName.."|r:"
+ local msg = "This addon has been deprecated and is therefore unlikely to receive new features, nor timely bug fixes. Continued support will largely be left up to the community.\n\nPlease consider switching to AdiBags' successor, BetterBags, which is written by the same team that maintains AdiBags and is available to download from Curse, Wago, and GitHub.\n\nThanks! :)"
+ print(prefix, msg)
local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
frame:SetBackdrop({
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
@@ -20,19 +20,12 @@ function addon:Deprecation()
})
frame:SetBackdropColor(0, 0, 0, 0.9)
frame:SetPoint("LEFT", 30, 0)
- frame:SetSize(440, 300)
+ frame:SetSize(440, 250)
local text = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
text:SetTextColor(1, 1, 1, 1)
text:SetPoint("LEFT", 20, 0)
text:SetJustifyH("LEFT")
- text:SetText([[
-AdiBags is deprecated, will get no new feature releases, and may or may not get bug fixes over time.
-Please consider switching to AdiBags' successor, BetterBags.
-BetterBags is written by the same team that maintains AdiBags.
-BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags
-This message will not be shown again, but you can continue to use AdiBags so long as it works.
-Thanks! :)
- ]])
+ text:SetText(prefix.."\n"..msg)
text:SetWordWrap(true)
text:SetWidth(400)
--frame:SetSize(text:GetStringWidth()+ 40, 200)
diff --git a/core/Utility.lua b/core/Utility.lua
index 420ed0c..5c3f24c 100644
--- a/core/Utility.lua
+++ b/core/Utility.lua
@@ -35,8 +35,9 @@ local GetContainerItemInfo = C_Container and C_Container.GetContainerItemInfo or
local GetContainerItemQuestInfo = C_Container and C_Container.GetContainerItemQuestInfo or GetContainerItemQuestInfo
local GetContainerNumFreeSlots = C_Container and C_Container.GetContainerNumFreeSlots or GetContainerNumFreeSlots
local geterrorhandler = _G.geterrorhandler
-local GetItemFamily = _G.GetItemFamily
-local GetItemInfo = _G.GetItemInfo
+local GetItemFamily = _G.C_Item.GetItemFamily
+local GetItemInfo = _G.C_Item.GetItemInfo
+local GetItemSubClassInfo = _G.C_Item.GetItemSubClassInfo
local ITEM_QUALITY_POOR
local ITEM_QUALITY_UNCOMMON
diff --git a/modules/CurrencyFrame.lua b/modules/CurrencyFrame.lua
index 4cba2b7..c0f6b27 100644
--- a/modules/CurrencyFrame.lua
+++ b/modules/CurrencyFrame.lua
@@ -39,7 +39,7 @@ local GetCurrencyInfo = _G.C_CurrencyInfo.GetCurrencyInfo
local GetCurrencyListSize = _G.C_CurrencyInfo.GetCurrencyListSize
local hooksecurefunc = _G.hooksecurefunc
local ipairs = _G.ipairs
-local IsAddOnLoaded = _G.IsAddOnLoaded
+local IsAddOnLoaded = _G.C_AddOns.IsAddOnLoaded
local tconcat = _G.table.concat
local tinsert = _G.tinsert
local unpack = _G.unpack
@@ -97,7 +97,7 @@ end
function mod:ADDON_LOADED(_, name)
if name ~= 'Blizzard_TokenUI' then return end
self:UnregisterEvent('ADDON_LOADED')
- hooksecurefunc('TokenFrame_Update', function() self:Update() end)
+ hooksecurefunc(TokenFrame, "Update", function() self:Update() end)
self.hooked = true
end
diff --git a/modules/FilterOverride.lua b/modules/FilterOverride.lua
index 67c5146..b717a61 100644
--- a/modules/FilterOverride.lua
+++ b/modules/FilterOverride.lua
@@ -28,7 +28,8 @@ local CLOSE = _G.CLOSE
local ClearCursor = _G.ClearCursor
local CreateFrame = _G.CreateFrame
local GetCursorInfo = _G.GetCursorInfo
-local GetItemInfo = _G.GetItemInfo
+local GetItemInfo = _G.C_Item.GetItemInfo
+local GetItemSubClassInfo = _G.C_Item.GetItemSubClassInfo
local IsAltKeyDown = _G.IsAltKeyDown
local ToggleDropDownMenu = _G.ToggleDropDownMenu
local UIDropDownMenu_AddButton = _G.UIDropDownMenu_AddButton
diff --git a/modules/ItemLevel.lua b/modules/ItemLevel.lua
index 354df0f..c4c9801 100644
--- a/modules/ItemLevel.lua
+++ b/modules/ItemLevel.lua
@@ -25,7 +25,8 @@ local L = addon.L
--