Skip to content

Commit

Permalink
Updated for Patch 11.0: The War Within.
Browse files Browse the repository at this point in the history
  • Loading branch information
Talyrius committed Aug 1, 2024
1 parent 901d951 commit a9a573c
Show file tree
Hide file tree
Showing 23 changed files with 160 additions and 40 deletions.
2 changes: 1 addition & 1 deletion AdiBags.toc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with AdiBags. If not, see <http://www.gnu.org/licenses/>.

## Interface: 100206
## Interface: 110000

## Title: AdiBags
## Notes: Adirelle's bag addon.
Expand Down
89 changes: 89 additions & 0 deletions AdiBags_Cata.toc
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.

## 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@
2 changes: 1 addition & 1 deletion AdiBags_Config/AdiBags_Config.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100206
## Interface: 110000

## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
Expand Down
25 changes: 25 additions & 0 deletions AdiBags_Config/AdiBags_Config_Cata.toc
Original file line number Diff line number Diff line change
@@ -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@
2 changes: 1 addition & 1 deletion AdiBags_Config/AdiBags_Config_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 11404
## Interface: 11503

## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
Expand Down
2 changes: 1 addition & 1 deletion AdiBags_Config/AdiBags_Config_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 30400
## Interface: 30403

## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
Expand Down
2 changes: 1 addition & 1 deletion AdiBags_Vanilla.toc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with AdiBags. If not, see <http://www.gnu.org/licenses/>.

## Interface: 11500
## Interface: 11503

## Title: AdiBags
## Notes: Adirelle's bag addon.
Expand Down
2 changes: 1 addition & 1 deletion AdiBags_Wrath.toc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with AdiBags. If not, see <http://www.gnu.org/licenses/>.

## Interface: 30401
## Interface: 30403

## Title: AdiBags
## Notes: Adirelle's bag addon.
Expand Down
2 changes: 1 addition & 1 deletion config/Config-ItemList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/Bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion core/Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

--<GLOBALS
local _G = _G
Expand All @@ -41,7 +42,7 @@ local NUM_REAGENTBAG_SLOTS = _G.NUM_REAGENTBAG_SLOTS
local NUM_TOTAL_EQUIPPED_BAG_SLOTS = _G.NUM_TOTAL_EQUIPPED_BAG_SLOTS
local NUM_BANKBAGSLOTS = _G.NUM_BANKBAGSLOTS
local TRADE_GOODS = _G.Enum.ItemClass.Tradegoods
local GetItemSubClassInfo = _G.GetItemSubClassInfo
local GetItemSubClassInfo = _G.C_Item.GetItemSubClassInfo
local pairs = _G.pairs
--GLOBALS>

Expand Down
6 changes: 3 additions & 3 deletions core/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions core/DefaultFilters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
17 changes: 5 additions & 12 deletions core/Deprecation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions core/Utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions modules/CurrencyFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion modules/FilterOverride.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion modules/ItemLevel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ local L = addon.L
--<GLOBALS
local _G = _G
local abs = _G.math.abs
local GetItemInfo = _G.GetItemInfo
local GetItemInfo = _G.C_Item.GetItemInfo
local GetItemQualityColor = _G.C_Item.GetItemQualityColor
local ITEM_QUALITY_HEIRLOOM
local ITEM_QUALITY_POOR

Expand Down
5 changes: 3 additions & 2 deletions modules/Junk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ local L = addon.L
local _G = _G
local format = _G.format
local GameTooltip = _G.GameTooltip
local GetItemInfo = _G.GetItemInfo
local GetItemInfo = _G.C_Item.GetItemInfo
local GetItemSubClassInfo = _G.C_Item.GetItemSubClassInfo
local hooksecurefunc = _G.hooksecurefunc
local IsAddOnLoaded = _G.IsAddOnLoaded
local IsAddOnLoaded = _G.C_AddOns.IsAddOnLoaded
local ITEM_QUALITY_POOR
local ITEM_QUALITY_UNCOMMON
if addon.isRetail then
Expand Down
2 changes: 1 addition & 1 deletion widgets/BagSlots.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ local GetContainerNumFreeSlots = C_Container and _G.C_Container.GetContainerNumF
local GetContainerNumSlots = C_Container and _G.C_Container.GetContainerNumSlots or _G.GetContainerNumSlots
local geterrorhandler = _G.geterrorhandler
local GetInventoryItemTexture = _G.GetInventoryItemTexture
local GetItemInfo = _G.GetItemInfo
local GetItemInfo = _G.C_Item.GetItemInfo
local GetNumBankSlots = _G.GetNumBankSlots
local ipairs = _G.ipairs
local IsInventoryItemLocked = _G.IsInventoryItemLocked
Expand Down
3 changes: 2 additions & 1 deletion widgets/ContainerFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ local GetContainerItemLink = C_Container and _G.C_Container.GetContainerItemLink
local GetContainerNumFreeSlots = C_Container and _G.C_Container.GetContainerNumFreeSlots or _G.GetContainerNumFreeSlots
local GetContainerNumSlots = C_Container and _G.C_Container.GetContainerNumSlots or _G.GetContainerNumSlots
local GetCursorInfo = _G.GetCursorInfo
local GetItemInfo = _G.GetItemInfo
local GetItemInfo = _G.C_Item.GetItemInfo
local GetItemGUID = _G.C_Item.GetItemGUID
local GetItemClassInfo = _G.C_Item.GetItemClassInfo
local GetMerchantItemLink = _G.GetMerchantItemLink
local ipairs = _G.ipairs
local max = _G.max
Expand Down
15 changes: 10 additions & 5 deletions widgets/ItemButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local GetContainerItemInfo = C_Container and _G.C_Container.GetContainerItemInfo
local GetContainerItemLink = C_Container and _G.C_Container.GetContainerItemLink or _G.GetContainerItemLink
local GetContainerItemQuestInfo = C_Container and _G.C_Container.GetContainerItemQuestInfo or _G.GetContainerItemQuestInfo
local GetContainerNumFreeSlots = C_Container and _G.C_Container.GetContainerNumFreeSlots or _G.GetContainerNumFreeSlots
local GetItemInfo = _G.GetItemInfo
local GetItemInfo = _G.C_Item.GetItemInfo
local GetItemQualityColor = _G.GetItemQualityColor
local hooksecurefunc = _G.hooksecurefunc
local IsBattlePayItem = C_Container and _G.C_Container.IsBattlePayItem or _G.IsBattlePayItem or function(...) return false end
Expand Down Expand Up @@ -92,8 +92,8 @@ function buttonProto:OnCreate()
end
self:RegisterForDrag("LeftButton")
self:RegisterForClicks("LeftButtonUp","RightButtonUp")
self:SetScript('OnShow', self.OnShow)
self:SetScript('OnHide', self.OnHide)
self:SetScript('OnShow', self._OnShow)
self:SetScript('OnHide', self._OnHide)
self:SetWidth(ITEM_SIZE)
self:SetHeight(ITEM_SIZE)
self.EmptySlotTextureFile = addon.EMPTY_SLOT_FILE
Expand Down Expand Up @@ -266,7 +266,7 @@ end
-- Scripts & event handlers
--------------------------------------------------------------------------------

function buttonProto:OnShow()
function buttonProto:_OnShow()
self:RegisterEvent('BAG_UPDATE_COOLDOWN', 'UpdateCooldownCallback')
self:RegisterEvent('ITEM_LOCK_CHANGED', 'UpdateLock')
self:RegisterEvent('QUEST_ACCEPTED', 'UpdateBorder')
Expand All @@ -281,7 +281,7 @@ function buttonProto:OnShow()
self:Update()
end

function buttonProto:OnHide()
function buttonProto:_OnHide()
self:UnregisterAllEvents()
self:UnregisterAllMessages()
if self.hasStackSplit and self.hasStackSplit == 1 then
Expand All @@ -296,6 +296,11 @@ function buttonProto:UNIT_QUEST_LOG_CHANGED(event, unit)
end
end

function buttonProto:ENCHANT_SPELL_COMPLETED()
if not self:CanUpdate() then return end
self:FullUpdate()
end

--------------------------------------------------------------------------------
-- Display updating
--------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit a9a573c

Please sign in to comment.