From a9a573cb7628e1fea1e0985b7110b8bcec28b75a Mon Sep 17 00:00:00 2001 From: Talyrius Date: Wed, 31 Jul 2024 19:35:50 -0700 Subject: [PATCH] Updated for Patch 11.0: The War Within. --- AdiBags.toc | 2 +- AdiBags_Cata.toc | 89 +++++++++++++++++++++++ AdiBags_Config/AdiBags_Config.toc | 2 +- AdiBags_Config/AdiBags_Config_Cata.toc | 25 +++++++ AdiBags_Config/AdiBags_Config_Vanilla.toc | 2 +- AdiBags_Config/AdiBags_Config_Wrath.toc | 2 +- AdiBags_Vanilla.toc | 2 +- AdiBags_Wrath.toc | 2 +- config/Config-ItemList.lua | 2 +- core/Bags.lua | 2 +- core/Constants.lua | 3 +- core/Core.lua | 6 +- core/DefaultFilters.lua | 2 + core/Deprecation.lua | 17 ++--- core/Utility.lua | 5 +- modules/CurrencyFrame.lua | 4 +- modules/FilterOverride.lua | 3 +- modules/ItemLevel.lua | 3 +- modules/Junk.lua | 5 +- widgets/BagSlots.lua | 2 +- widgets/ContainerFrame.lua | 3 +- widgets/ItemButton.lua | 15 ++-- widgets/Section.lua | 2 +- 23 files changed, 160 insertions(+), 40 deletions(-) create mode 100644 AdiBags_Cata.toc create mode 100644 AdiBags_Config/AdiBags_Config_Cata.toc diff --git a/AdiBags.toc b/AdiBags.toc index 606d2460..a4390789 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 00000000..bfa6658f --- /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 f90c3de2..2e453d28 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 00000000..b74a8574 --- /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 0fa351f0..33af37d1 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 84213740..a896e53b 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 f0dde88b..5752e7e2 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 6f850c96..2dd61cd6 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 3197b16a..d87d9c70 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 1be97f2d..fa2dc821 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 c95bda41..f4970b0d 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 58fc13fc..9be1410a 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 c445469b..d786169d 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 f376650d..9e1c681d 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 420ed0ca..5c3f24c5 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 4cba2b7b..c0f6b278 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 67c51467..b717a617 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 354df0f0..c4c98010 100644 --- a/modules/ItemLevel.lua +++ b/modules/ItemLevel.lua @@ -25,7 +25,8 @@ local L = addon.L --