From aedd0742bdf309f80886ab0bf5d9a75926f11eb1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:50:31 +0000 Subject: [PATCH 1/5] Initial plan From e4674ecf1d3730d77a740f7363f111b951b2780f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:55:17 +0000 Subject: [PATCH 2/5] Adapt LibSharedMedia-3.0 for WoW 3.3.5a WOTLK compatibility Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com> --- LibSharedMedia-3.0.toc | 2 +- LibSharedMedia-3.0/LibSharedMedia-3.0.lua | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/LibSharedMedia-3.0.toc b/LibSharedMedia-3.0.toc index 78b7cb4..e4ce6f4 100644 --- a/LibSharedMedia-3.0.toc +++ b/LibSharedMedia-3.0.toc @@ -1,4 +1,4 @@ -## Interface: 11508, 11507, 20505, 30405, 38000, 40402, 50503, 50502, 120001, 110207, 120000 +## Interface: 30300, 11508, 11507, 20505, 30405, 38000, 40402, 50503, 50502, 120001, 110207, 120000 ## LoadOnDemand: 1 ## Title: Lib: SharedMedia-3.0 diff --git a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua index 3fc6b2c..24bd9c4 100644 --- a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua +++ b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua @@ -10,7 +10,7 @@ Dependencies: LibStub, CallbackHandler-1.0 License: LGPL v2.1 ]] -local MAJOR, MINOR = "LibSharedMedia-3.0", 12000001 -- 12.0.0 v1 / increase manually on changes +local MAJOR, MINOR = "LibSharedMedia-3.0", 3000001 -- 3.0.0 v1 / increase manually on changes local lib = LibStub:NewLibrary(MAJOR, MINOR) if not lib then return end @@ -61,18 +61,13 @@ lib.MediaType.SOUND = "sound" -- sound files -- BACKGROUND if not lib.MediaTable.background then lib.MediaTable.background = {} end lib.MediaTable.background["None"] = [[]] -lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]] lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]] lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]] lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]] -lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]] -lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]] -lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]] lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]] lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]] lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]] lib.MediaTable.background["Blizzard Parchment"] = [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]] -lib.MediaTable.background["Blizzard Parchment 2"] = [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]] lib.MediaTable.background["Blizzard Rock"] = [[Interface\FrameGeneral\UI-Background-Rock]] lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]] lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]] @@ -181,9 +176,9 @@ else SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]] SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]] SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]] - SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]] + SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]] SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]] - SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]] + SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]] -- lib.DefaultMedia.font = "Friz Quadrata TT" -- @@ -199,7 +194,7 @@ lib.DefaultMedia.statusbar = "Blizzard" -- SOUND if not lib.MediaTable.sound then lib.MediaTable.sound = {} end -lib.MediaTable.sound["None"] = 1 -- Relies on the fact that PlaySoundFile doesn't error on this value +lib.MediaTable.sound["None"] = [[]] -- PlaySoundFile in WoW 3.3.5a requires a string; Fetch returns nil for empty strings (no sound) lib.DefaultMedia.sound = "None" local function buildMediaList(mediatype) From 042d1eceb2882e858fa7163fdb0c0ee8ca844f33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:59:10 +0000 Subject: [PATCH 3/5] Keep MINOR version monotonically increasing (12000002) for reliable LibStub precedence Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com> --- LibSharedMedia-3.0/LibSharedMedia-3.0.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua index 24bd9c4..b667731 100644 --- a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua +++ b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua @@ -10,7 +10,7 @@ Dependencies: LibStub, CallbackHandler-1.0 License: LGPL v2.1 ]] -local MAJOR, MINOR = "LibSharedMedia-3.0", 3000001 -- 3.0.0 v1 / increase manually on changes +local MAJOR, MINOR = "LibSharedMedia-3.0", 12000002 -- 3.0.0 v1 / increase manually on changes local lib = LibStub:NewLibrary(MAJOR, MINOR) if not lib then return end From 9ed8493790635b0aac3a45954fdd1c57c42bc112 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:05:25 +0000 Subject: [PATCH 4/5] Fix securecallfunction nil crash in CallbackHandler-1.0 and use safe sound None sentinel Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com> --- CallbackHandler-1.0/CallbackHandler-1.0.lua | 4 +++- LibSharedMedia-3.0/LibSharedMedia-3.0.lua | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CallbackHandler-1.0/CallbackHandler-1.0.lua b/CallbackHandler-1.0/CallbackHandler-1.0.lua index 21569f4..c9601e3 100644 --- a/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -7,7 +7,9 @@ if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -- Lua APIs -local securecallfunction, error = securecallfunction, error +-- securecallfunction does not exist in WoW 3.3.5a; fall back to a direct call +local securecallfunction = securecallfunction or function(func, ...) return func(...) end +local error = error local setmetatable, rawget = setmetatable, rawget local next, select, pairs, type, tostring = next, select, pairs, type, tostring diff --git a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua index b667731..8b55aed 100644 --- a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua +++ b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua @@ -194,7 +194,7 @@ lib.DefaultMedia.statusbar = "Blizzard" -- SOUND if not lib.MediaTable.sound then lib.MediaTable.sound = {} end -lib.MediaTable.sound["None"] = [[]] -- PlaySoundFile in WoW 3.3.5a requires a string; Fetch returns nil for empty strings (no sound) +lib.MediaTable.sound["None"] = [[Interface\Quiet.ogg]] -- non-empty string so Fetch returns a value; file absent in 3.3.5a so no sound plays lib.DefaultMedia.sound = "None" local function buildMediaList(mediatype) From b8d39c5ac50e438ad449738f47c3d2f245050154 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:29:27 +0000 Subject: [PATCH 5/5] Improve securecallfunction fallback with xpcall/geterrorhandler for error isolation Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com> --- CallbackHandler-1.0/CallbackHandler-1.0.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CallbackHandler-1.0/CallbackHandler-1.0.lua b/CallbackHandler-1.0/CallbackHandler-1.0.lua index c9601e3..56f4bd4 100644 --- a/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -7,8 +7,19 @@ if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -- Lua APIs --- securecallfunction does not exist in WoW 3.3.5a; fall back to a direct call -local securecallfunction = securecallfunction or function(func, ...) return func(...) end +local xpcall = xpcall +local geterrorhandler = geterrorhandler +-- securecallfunction does not exist in WoW 3.3.5a; provide a fallback that preserves error-isolation semantics +local securecallfunction = securecallfunction or function(func, ...) + if geterrorhandler then + local errorhandler = geterrorhandler() + if errorhandler then + xpcall(func, errorhandler, ...) + return + end + end + return func(...) +end local error = error local setmetatable, rawget = setmetatable, rawget local next, select, pairs, type, tostring = next, select, pairs, type, tostring