Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 07d34cb

Browse files
committed
lib updates for BCC Classic
had to manually fix librangecheck, hopefully that gets updated soon
1 parent 4c39a2d commit 07d34cb

File tree

11 files changed

+93
-50
lines changed

11 files changed

+93
-50
lines changed

Libs/AceComm-3.0/ChatThrottleLib.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ local next = next
7575
local strlen = string.len
7676
local GetFramerate = GetFramerate
7777
local strlower = string.lower
78-
local unpack,type,pairs,wipe = unpack,type,pairs,wipe
78+
local unpack,type,pairs,wipe = unpack,type,pairs,table.wipe
7979
local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
8080

8181

Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
22
-- @class file
33
-- @name AceConfigDialog-3.0
4-
-- @release $Id: AceConfigDialog-3.0.lua 1232 2020-04-14 22:21:22Z nevcairiel $
4+
-- @release $Id: AceConfigDialog-3.0.lua 1248 2021-02-05 14:27:49Z funkehdude $
55

66
local LibStub = LibStub
77
local gui = LibStub("AceGUI-3.0")
88
local reg = LibStub("AceConfigRegistry-3.0")
99

10-
local MAJOR, MINOR = "AceConfigDialog-3.0", 79
10+
local MAJOR, MINOR = "AceConfigDialog-3.0", 81
1111
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
1212

1313
if not AceConfigDialog then return end
@@ -22,10 +22,10 @@ AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
2222
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
2323

2424
-- Lua APIs
25-
local tinsert, tsort, tremove = table.insert, table.sort, table.remove
25+
local tinsert, tsort, tremove, wipe = table.insert, table.sort, table.remove, table.wipe
2626
local strmatch, format = string.match, string.format
2727
local error = error
28-
local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs
28+
local pairs, next, select, type, unpack, ipairs = pairs, next, select, type, unpack, ipairs
2929
local tostring, tonumber = tostring, tonumber
3030
local math_min, math_max, math_floor = math.min, math.max, math.floor
3131

@@ -544,13 +544,15 @@ local function GetFuncName(option)
544544
end
545545
do
546546
local frame = AceConfigDialog.popup
547-
if not frame then
547+
if not frame or oldminor < 81 then
548548
frame = CreateFrame("Frame", nil, UIParent)
549549
AceConfigDialog.popup = frame
550550
frame:Hide()
551551
frame:SetPoint("CENTER", UIParent, "CENTER")
552552
frame:SetSize(320, 72)
553+
frame:EnableMouse(true) -- Do not allow click-through on the frame
553554
frame:SetFrameStrata("TOOLTIP")
555+
frame:SetFrameLevel(100) -- Lots of room to draw under it
554556
frame:SetScript("OnKeyDown", function(self, key)
555557
if key == "ESCAPE" then
556558
self:SetPropagateKeyboardInput(false)
@@ -564,7 +566,7 @@ do
564566
end
565567
end)
566568

567-
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
569+
if not frame.SetFixedFrameStrata then -- API capability check (classic check)
568570
frame:SetBackdrop({
569571
bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
570572
edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
@@ -574,8 +576,10 @@ do
574576
insets = { left = 11, right = 11, top = 11, bottom = 11 },
575577
})
576578
else
577-
local border = CreateFrame("Frame", nil, frame, "DialogBorderDarkTemplate")
579+
local border = CreateFrame("Frame", nil, frame, "DialogBorderOpaqueTemplate")
578580
border:SetAllPoints(frame)
581+
frame:SetFixedFrameStrata(true)
582+
frame:SetFixedFrameLevel(true)
579583
end
580584

581585
local text = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight")

Libs/AceGUI-3.0/AceGUI-3.0.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
-- f:AddChild(btn)
2525
-- @class file
2626
-- @name AceGUI-3.0
27-
-- @release $Id: AceGUI-3.0.lua 1231 2020-04-14 22:20:36Z nevcairiel $
27+
-- @release $Id: AceGUI-3.0.lua 1247 2021-01-23 23:16:39Z funkehdude $
2828
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 41
2929
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
3030

3131
if not AceGUI then return end -- No upgrade needed
3232

3333
-- Lua APIs
34-
local tinsert = table.insert
34+
local tinsert, wipe = table.insert, table.wipe
3535
local select, pairs, next, type = select, pairs, next, type
3636
local error, assert = error, assert
3737
local setmetatable, rawget = setmetatable, rawget

Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
BlizOptionsGroup Container
33
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
44
-------------------------------------------------------------------------------]]
5-
local Type, Version = "BlizOptionsGroup", 21
5+
local Type, Version = "BlizOptionsGroup", 22
66
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
77
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
88

@@ -99,7 +99,7 @@ local methods = {
9999
Constructor
100100
-------------------------------------------------------------------------------]]
101101
local function Constructor()
102-
local frame = CreateFrame("Frame")
102+
local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
103103
frame:Hide()
104104

105105
-- support functions for the Blizzard Interface Options

Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--[[-----------------------------------------------------------------------------
22
Frame Container
33
-------------------------------------------------------------------------------]]
4-
local Type, Version = "Frame", 27
4+
local Type, Version = "Frame", 28
55
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
66
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
77

@@ -83,6 +83,7 @@ local methods = {
8383
["OnAcquire"] = function(self)
8484
self.frame:SetParent(UIParent)
8585
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
86+
self.frame:SetFrameLevel(100) -- Lots of room to draw under it
8687
self:SetTitle()
8788
self:SetStatusText()
8889
self:ApplyStatus()
@@ -186,6 +187,7 @@ local function Constructor()
186187
frame:SetMovable(true)
187188
frame:SetResizable(true)
188189
frame:SetFrameStrata("FULLSCREEN_DIALOG")
190+
frame:SetFrameLevel(100) -- Lots of room to draw under it
189191
frame:SetBackdrop(FrameBackdrop)
190192
frame:SetBackdropColor(0, 0, 0, 1)
191193
frame:SetMinResize(400, 200)

Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
77
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
88

99
-- Lua APIs
10-
local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe
10+
local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, table.wipe
1111

1212
-- WoW APIs
1313
local PlaySound = PlaySound

Libs/AceHook-3.0/AceHook-3.0.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
-- make into AceHook.
1010
-- @class file
1111
-- @name AceHook-3.0
12-
-- @release $Id: AceHook-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
13-
local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 8
12+
-- @release $Id: AceHook-3.0.lua 1243 2020-10-18 00:00:19Z nevcairiel $
13+
local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 9
1414
local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
1515

1616
if not AceHook then return end -- No upgrade needed
@@ -478,10 +478,10 @@ function AceHook:UnhookAll()
478478
for key, value in pairs(registry[self]) do
479479
if type(key) == "table" then
480480
for method in pairs(value) do
481-
self:Unhook(key, method)
481+
AceHook.Unhook(self, key, method)
482482
end
483483
else
484-
self:Unhook(key)
484+
AceHook.Unhook(self, key)
485485
end
486486
end
487487
end

Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--
77

88
local DBICON10 = "LibDBIcon-1.0"
9-
local DBICON10_MINOR = 43 -- Bump on changes
9+
local DBICON10_MINOR = 44 -- Bump on changes
1010
if not LibStub then error(DBICON10 .. " requires LibStub.") end
1111
local ldb = LibStub("LibDataBroker-1.1", true)
1212
if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end
@@ -18,8 +18,8 @@ lib.callbackRegistered = lib.callbackRegistered or nil
1818
lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib)
1919
lib.notCreated = lib.notCreated or {}
2020
lib.radius = lib.radius or 5
21+
local next, Minimap, CreateFrame = next, Minimap, CreateFrame
2122
lib.tooltip = lib.tooltip or CreateFrame("GameTooltip", "LibDBIconTooltip", UIParent, "GameTooltipTemplate")
22-
local next, Minimap = next, Minimap
2323
local isDraggingButton = false
2424

2525
function lib:IconCallback(event, name, key, value)
@@ -218,8 +218,14 @@ local function createButton(name, object, db)
218218
button.dataObject = object
219219
button.db = db
220220
button:SetFrameStrata("MEDIUM")
221-
button:SetSize(31, 31)
221+
if button.SetFixedFrameStrata then -- Classic support
222+
button:SetFixedFrameStrata(true)
223+
end
222224
button:SetFrameLevel(8)
225+
if button.SetFixedFrameLevel then -- Classic support
226+
button:SetFixedFrameLevel(true)
227+
end
228+
button:SetSize(31, 31)
223229
button:RegisterForClicks("anyUp")
224230
button:RegisterForDrag("LeftButton")
225231
button:SetHighlightTexture(136477) --"Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight"

Libs/LibDualSpec-1.0/LibDualSpec-1.0.lua

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
--]]
3333

3434
-- just bail out on classic, there is no DualSpec there
35-
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then return end
35+
if WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE then return end
3636

37-
local MAJOR, MINOR = "LibDualSpec-1.0", 19
37+
local MAJOR, MINOR = "LibDualSpec-1.0", 20
3838
assert(LibStub, MAJOR.." requires LibStub")
3939
local lib, minor = LibStub:NewLibrary(MAJOR, MINOR)
4040
if not lib then return end
@@ -72,7 +72,7 @@ local AceDB3 = LibStub('AceDB-3.0', true)
7272
local AceDBOptions3 = LibStub('AceDBOptions-3.0', true)
7373
local AceConfigRegistry3 = LibStub('AceConfigRegistry-3.0', true)
7474

75-
-- classId specialization functions don't require player data to be loaded
75+
-- class id specialization functions don't require player data to be loaded
7676
local _, _, classId = UnitClass("player")
7777
local numSpecs = GetNumSpecializationsForClassID(classId)
7878

@@ -82,22 +82,38 @@ local numSpecs = GetNumSpecializationsForClassID(classId)
8282

8383
local L_ENABLED = "Enable spec profiles"
8484
local L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
85-
local L_CURRENT = "%s (Current)" -- maybe something like >> %s << and/or coloring to avoid localization?
85+
local L_CURRENT = "%s (Current)"
8686

8787
do
8888
local locale = GetLocale()
89-
if locale == "frFR" then
90-
-- L_ENABLED = "Enable spec profiles"
91-
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
92-
-- L_CURRENT = "%s (Current)"
93-
elseif locale == "deDE" then
89+
if locale == "deDE" then
9490
L_ENABLED = "Spezialisierungsprofile aktivieren"
9591
L_ENABLED_DESC = "Falls diese Option aktiviert ist, wird dein Profil auf das angegebene Profil gesetzt, wenn du die Spezialisierung wechselst."
9692
L_CURRENT = "%s (Momentan)"
93+
elseif locale == "esES" then
94+
-- L_ENABLED = "Enable spec profiles"
95+
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
96+
-- L_CURRENT = "%s (Current)"
97+
elseif locale == "esMX" then
98+
-- L_ENABLED = "Enable spec profiles"
99+
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
100+
-- L_CURRENT = "%s (Current)"
101+
elseif locale == "frFR" then
102+
-- L_ENABLED = "Enable spec profiles"
103+
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
104+
-- L_CURRENT = "%s (Current)"
105+
elseif locale == "itIT" then
106+
L_ENABLED = "Abilita i profili per la specializzazione"
107+
L_ENABLED_DESC = "Quando abilitato, il tuo profilo verrà impostato in base alla specializzazione usata."
108+
L_CURRENT = "%s (Attuale)"
97109
elseif locale == "koKR" then
98110
-- L_ENABLED = "Enable spec profiles"
99111
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
100112
-- L_CURRENT = "%s (Current)"
113+
elseif locale == "ptBR" then
114+
-- L_ENABLED = "Enable spec profiles"
115+
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
116+
-- L_CURRENT = "%s (Current)"
101117
elseif locale == "ruRU" then
102118
L_ENABLED = "Включить профили специализации"
103119
L_ENABLED_DESC = "Если включено, ваш профиль будет зависеть от выбранной специализации."
@@ -110,18 +126,6 @@ do
110126
L_ENABLED = "啟用專精設定檔"
111127
L_ENABLED_DESC = "當啟用後,當你切換專精時設定檔會設定為專精設定檔。"
112128
L_CURRENT = "%s (目前) "
113-
elseif locale == "esES" or locale == "esMX" then
114-
-- L_ENABLED = "Enable spec profiles"
115-
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
116-
-- L_CURRENT = "%s (Current)"
117-
elseif locale == "ptBR" then
118-
-- L_ENABLED = "Enable spec profiles"
119-
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
120-
-- L_CURRENT = "%s (Current)"
121-
elseif locale == "itIT" then
122-
-- L_ENABLED = "Enable spec profiles"
123-
-- L_ENABLED_DESC = "When enabled, your profile will be set to the specified profile when you change specialization."
124-
-- L_CURRENT = "%s (Current)"
125129
end
126130
end
127131

@@ -406,18 +410,20 @@ end
406410
-- ----------------------------------------------------------------------------
407411

408412
local function eventHandler(self, event)
409-
lib.currentSpec = GetSpecialization() or 0
413+
local spec = GetSpecialization() or 0
410414
-- Newly created characters start at 5 instead of 1 in 9.0.1.
411-
if lib.currentSpec == 5 or not C_SpecializationInfo.CanPlayerUseTalentSpecUI() then
412-
lib.currentSpec = 0
415+
if spec == 5 or not C_SpecializationInfo.CanPlayerUseTalentSpecUI() then
416+
spec = 0
413417
end
418+
lib.currentSpec = spec
414419

415420
if event == "PLAYER_LOGIN" then
416421
self:UnregisterEvent(event)
417422
self:RegisterUnitEvent("PLAYER_SPECIALIZATION_CHANGED", "player")
423+
self:RegisterEvent("PLAYER_LEVEL_CHANGED")
418424
end
419425

420-
if lib.currentSpec > 0 and next(upgrades) then
426+
if spec > 0 and next(upgrades) then
421427
for target in next, upgrades do
422428
UpgradeDatabase(target)
423429
end
@@ -446,3 +452,29 @@ else
446452
lib.eventFrame:RegisterEvent("PLAYER_LOGIN")
447453
end
448454

455+
--@do-not-package@
456+
if not lib.testdb then
457+
local AC = LibStub("AceConfig-3.0", true)
458+
local ACD = LibStub("AceConfigDialog-3.0", true)
459+
local ADO = LibStub("AceDBOptions-3.0", true)
460+
if AC and ACD and ADO then
461+
local key = format("%s-%d test", MAJOR, MINOR)
462+
local testdb = LibStub('AceDB-3.0'):New(key)
463+
lib.testdb = testdb
464+
testdb:RegisterCallback("OnNewProfile", print)
465+
testdb:RegisterCallback("OnProfileChanged", print)
466+
testdb:RegisterCallback("OnProfileShutdown", print)
467+
testdb:RegisterCallback("OnProfileCopied", print)
468+
testdb:RegisterCallback("OnProfileDeleted", print)
469+
testdb:RegisterCallback("OnProfileReset", print)
470+
testdb:RegisterCallback("OnDatabaseReset", print)
471+
testdb:RegisterCallback("OnDatabaseShutdown", print)
472+
lib:EnhanceDatabase(testdb, key)
473+
local options = ADO:GetOptionsTable(testdb)
474+
lib:EnhanceOptions(options, testdb)
475+
AC:RegisterOptionsTable(key, options)
476+
SlashCmdList["SPECPROFILES"] = function() ACD:Open(key) end
477+
SLASH_SPECPROFILES1 = "/testdb"
478+
end
479+
end
480+
--@end-do-not-package@

Libs/LibDualSpec-1.0/LibDualSpec-1.0.toc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Interface: 90002
1+
## Interface: 90005
22
## LoadOnDemand: 1
33
## Title: Lib: DualSpec-1.0
4-
## Version: 1.18
5-
## X-Date: 2020-11-18T17:30:37Z
4+
## Version: @project-version@
5+
## X-Date: @project-date-iso@
66
## Notes: Adds spec switching support to individual AceDB-3.0 databases.
77
## Author: Adirelle
88
## OptionalDeps: Ace3

0 commit comments

Comments
 (0)