Skip to content

Commit

Permalink
Add support for The War Within (WoW 11)
Browse files Browse the repository at this point in the history
  • Loading branch information
azuraji committed Aug 18, 2024
1 parent ad4de84 commit 298be69
Show file tree
Hide file tree
Showing 43 changed files with 238 additions and 210 deletions.
2 changes: 1 addition & 1 deletion Broker2FuBar/Broker2FuBar.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## Title: Broker2FuBar
## Notes: Shows your LDB sources in FuBar.
## Author: Kemayo, Adirelle, Arrowmaster
Expand Down
2 changes: 1 addition & 1 deletion Broker2FuBar/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ addon.registry = {}
addon.fubared = {}

function addon:OnInitialize()
if IsAddOnLoaded('FuBar2Broker') then
if C_AddOns.IsAddOnLoaded('FuBar2Broker') then
self:Print(self.name..' disabled itself because FuBar2Broker is loaded. Running these two addons at the same time is a very bad idea.')
self:SetEnabledState(false)
return
Expand Down
6 changes: 3 additions & 3 deletions Broker2FuBar/libs/LibFuBarPlugin-3.0/LibFuBarPlugin-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ function FuBarPlugin:SetFontSize(size)
end

local function IsLoadOnDemand(plugin)
return IsAddOnLoadOnDemand(folderNames[plugin] or "")
return C_AddOns.IsAddOnLoadOnDemand(folderNames[plugin] or "")
end

-- #NODOC
Expand All @@ -1256,8 +1256,8 @@ function FuBarPlugin:Embed(target)
local partFolder = stack:match("...([^/]+)/")
if partFolder then
local partFolder_len = #partFolder
for i = 1, GetNumAddOns() do
local name = GetAddOnInfo(i)
for i = 1, C_AddOns.GetNumAddOns() do
local name = C_AddOns.GetAddOnInfo(i)
if #name >= partFolder_len then
local partName = name:sub(-partFolder_len)
if partName == partFolder then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## Title: Lib: FuBarPlugin-3.0
## Notes: A library to provide a means create a FuBar-compatible plugin.
## Notes-zhTW: 一個提供支援FuBar所需功能的插件。
Expand Down
2 changes: 1 addition & 1 deletion Broker2FuBar/libs/LibFuBarPlugin-3.0/LibStub/LibStub.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
Expand Down
20 changes: 10 additions & 10 deletions FuBar/FuBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ function FuBar:OnEnable()

self:AddEventListener("CVAR_UPDATE", "OnCVarUpdate")

DisableAddOn("FuBar-compat-1.2")
C_AddOns.DisableAddOn("FuBar-compat-1.2")

self:AddSecureHook("RestartGx")

Expand Down Expand Up @@ -1069,18 +1069,18 @@ local function findFuBarDep(...)
end

local function isFuBarDependent(name)
local data = GetAddOnMetadata(name, "X-FuBar-Dependent")
local data = C_AddOns.GetAddOnMetadata(name, "X-FuBar-Dependent")
data = tonumber(data) or data
if data and data ~= 0 then
return true
end
return findFuBarDep(GetAddOnDependencies(name))
return findFuBarDep(C_AddOns.GetAddOnDependencies(name))
end

function FuBar:LoadLoadOnDemandPlugins()
for i = 1, GetNumAddOns() do
local name, _, notes, enabled, loadable = GetAddOnInfo(i)
if IsAddOnLoadOnDemand(i) and enabled and loadable and not IsAddOnLoaded(i) then
for i = 1, C_AddOns.GetNumAddOns() do
local name, _, notes, enabled, loadable = C_AddOns.GetAddOnInfo(i)
if C_AddOns.IsAddOnLoadOnDemand(i) and enabled and loadable and not C_AddOns.IsAddOnLoaded(i) then
if isFuBarDependent(name) then
if not self.db.profile.loadOnDemand[name] then
self:LoadPlugin(name)
Expand Down Expand Up @@ -1553,10 +1553,10 @@ function FuBar:OnProfileEnable(oldName, _, copyFrom)

self:CheckResolution()

for i = 1, GetNumAddOns() do
local name, _, notes, enabled, loadable = GetAddOnInfo(i)
if IsAddOnLoadOnDemand(i) and enabled and loadable and not IsAddOnLoaded(i) then
if findFuBarDep(GetAddOnDependencies(name)) then
for i = 1, C_AddOns.GetNumAddOns() do
local name, _, notes, enabled, loadable = C_AddOns.GetAddOnInfo(i)
if C_AddOns.IsAddOnLoadOnDemand(i) and enabled and loadable and not C_AddOns.IsAddOnLoaded(i) then
if findFuBarDep(C_AddOns.GetAddOnDependencies(name)) then
if not self.db.profile.loadOnDemand[name] then
self:LoadPlugin(name)
elseif not self.db.profile.loadOnDemand[name].disabled and (not self.db.profile.loadOnDemand[name].condition or CheckLoadCondition(self.db.profile.loadOnDemand[name].condition)) then
Expand Down
2 changes: 1 addition & 1 deletion FuBar/FuBar.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## Title: FuBar 4.0
## Notes: A panel that modules can plug into.
## Notes-ruRU: Панели для отображения различных плагинов.
Expand Down
18 changes: 9 additions & 9 deletions FuBar/libs/AceLibrary/AceLibrary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,13 @@ end

local function TryToEnable(addon)
if DONT_ENABLE_LIBRARIES then return end
local isondemand = IsAddOnLoadOnDemand(addon)
local isondemand = C_AddOns.IsAddOnLoadOnDemand(addon)
if isondemand then
local _, _, _, enabled = GetAddOnInfo(addon)
EnableAddOn(addon)
local _, _, _, _, loadable = GetAddOnInfo(addon)
local _, _, _, enabled = C_AddOns.GetAddOnInfo(addon)
C_AddOns.EnableAddOn(addon)
local _, _, _, _, loadable = C_AddOns.GetAddOnInfo(addon)
if not loadable and not enabled then
DisableAddOn(addon)
C_AddOns.DisableAddOn(addon)
end

return loadable
Expand All @@ -381,7 +381,7 @@ local function TryToLoadStandalone(major)

AceLibrary.scannedlibs[major] = true

local name, _, _, enabled, loadable = GetAddOnInfo(major)
local name, _, _, enabled, loadable = C_AddOns.GetAddOnInfo(major)

loadable = (enabled and loadable) or TryToEnable(name)

Expand All @@ -392,9 +392,9 @@ local function TryToLoadStandalone(major)
end

local field = "X-AceLibrary-" .. major
for i = 1, GetNumAddOns() do
if GetAddOnMetadata(i, field) then
name, _, _, enabled, loadable = GetAddOnInfo(i)
for i = 1, C_AddOns.GetNumAddOns() do
if C_AddOns.GetAddOnMetadata(i, field) then
name, _, _, enabled, loadable = C_AddOns.GetAddOnInfo(i)

loadable = (enabled and loadable) or TryToEnable(name)
if loadable then
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/AceLibrary/AceLibrary.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r1101
## X-Curse-Project-Name: Ace2
## X-Curse-Project-ID: ace2
Expand Down
6 changes: 3 additions & 3 deletions FuBar/libs/LibFuBarPlugin-3.0/LibFuBarPlugin-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ function FuBarPlugin:SetFontSize(size)
end

local function IsLoadOnDemand(plugin)
return IsAddOnLoadOnDemand(folderNames[plugin] or "")
return C_AddOns.IsAddOnLoadOnDemand(folderNames[plugin] or "")
end

-- #NODOC
Expand All @@ -1256,8 +1256,8 @@ function FuBarPlugin:Embed(target)
local partFolder = stack:match("...([^/]+)/")
if partFolder then
local partFolder_len = #partFolder
for i = 1, GetNumAddOns() do
local name = GetAddOnInfo(i)
for i = 1, C_AddOns.GetNumAddOns() do
local name = C_AddOns.GetAddOnInfo(i)
if #name >= partFolder_len then
local partName = name:sub(-partFolder_len)
if partName == partFolder then
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibFuBarPlugin-3.0/LibFuBarPlugin-3.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## LoadOnDemand: 1
## Title: Lib: FuBarPlugin-3.0
## Notes: A library to provide a means create a FuBar-compatible plugin.
Expand Down
33 changes: 18 additions & 15 deletions FuBar/libs/LibJostle-3.0/LibJostle-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ local blizzardFrames = {
'PlayerFrame',
'TargetFrame',
'MinimapCluster',
'PartyMemberFrame1',
-- 'PartyMemberFrame1',
'TicketStatusFrame',
'WorldStateAlwaysUpFrame',
-- 'WorldStateAlwaysUpFrame',
'MainMenuBar',
'MultiBarRight',
'CT_PlayerFrame_Drag',
'CT_TargetFrame_Drag',
'Gypsy_PlayerFrameCapsule',
'Gypsy_TargetFrameCapsule',
'ConsolidatedBuffs',
-- 'CT_PlayerFrame_Drag',
-- 'CT_TargetFrame_Drag',
-- 'Gypsy_PlayerFrameCapsule',
-- 'Gypsy_TargetFrameCapsule',
-- 'ConsolidatedBuffs',
'BuffFrame',
-- 'DEFAULT_CHAT_FRAME',
-- 'ChatFrame2',
'GroupLootFrame1',
'TutorialFrameParent',
'FramerateLabel',
-- 'TutorialFrameParent',
-- 'FramerateLabel',
'DurabilityFrame',
'CastingBarFrame',
'OrderHallCommandBar',
-- 'CastingBarFrame',
-- 'OrderHallCommandBar',
'MicroButtonAndBagsBar',
'UIWidgetTopCenterContainerFrame',
'StatusTrackingBarManager',
Expand Down Expand Up @@ -364,16 +364,19 @@ function Jostle:Refresh(...)
end
end

for _,frame in ipairs(frames) do
for _, frame in ipairs(frames) do
if type(frame) == "string" then
-- print(frame, _G[frame])
frame = _G[frame]
end

local framescale = frame and frame.GetScale and frame:GetScale() or 1

if ((frame and frame.IsUserPlaced and not frame:IsUserPlaced()) or ((frame == DEFAULT_CHAT_FRAME or frame == ChatFrame2) and SIMPLE_CHAT == "1") or frame == FramerateLabel) and (frame ~= ChatFrame2 or SIMPLE_CHAT == "1") then
if ((frame.IsUserPlaced and not frame:IsUserPlaced()) or ((frame == DEFAULT_CHAT_FRAME or frame == ChatFrame2) and SIMPLE_CHAT == "1") or frame == FramerateLabel) and (frame ~= ChatFrame2 or SIMPLE_CHAT == "1") then
local frameData = blizzardFramesData[frame]
if (select(2, frame:GetPoint(1)) ~= UIParent and select(2, frame:GetPoint(1)) ~= WorldFrame) then
local _, relativeTo, relativePoint = frame:GetPoint(1)

if relativeTo ~= UIParent and relativeTo ~= WorldFrame then
-- do nothing
elseif frame == PlayerFrame and (CT_PlayerFrame_Drag or Gypsy_PlayerFrameCapsule) then
-- do nothing
Expand All @@ -383,7 +386,7 @@ function Jostle:Refresh(...)
-- do nothing
elseif frame == MainMenuBar and Gypsy_HotBarCapsule then
-- do nothing
elseif frame == MinimapCluster and select(3, frame:GetPoint(1)) ~= "TOPRIGHT" then
elseif frame == MinimapCluster and relativePoint ~= "TOPRIGHT" then
-- do nothing
elseif frame == DurabilityFrame and DurabilityFrame:IsShown() and (DurabilityFrame:GetLeft() > GetScreenWidth() or DurabilityFrame:GetRight() < 0 or DurabilityFrame:GetBottom() > GetScreenHeight() or DurabilityFrame:GetTop() < 0) then
DurabilityFrame:Hide()
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibJostle-3.0/LibJostle-3.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## LoadOnDemand: 1
## Title: Lib: Jostle-3.0
## Notes: A library to handle rearrangement of blizzard's frames when bars are added to the sides of the screen.
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibJostle-3.0/LibStub/LibStub.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
Expand Down
14 changes: 7 additions & 7 deletions FuBar/libs/LibRock-1.0/LibRock-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ local tonumber = _G.tonumber
local strmatch = _G.strmatch
local table_remove = _G.table.remove
local debugstack = _G.debugstack
local LoadAddOn = _G.LoadAddOn
local GetAddOnInfo = _G.GetAddOnInfo
local GetAddOnMetadata = _G.GetAddOnMetadata
local GetNumAddOns = _G.GetNumAddOns
local DisableAddOn = _G.DisableAddOn
local EnableAddOn = _G.EnableAddOn
local IsAddOnLoadOnDemand = _G.IsAddOnLoadOnDemand
local LoadAddOn = C_AddOns.LoadAddOn
local GetAddOnInfo = C_AddOns.GetAddOnInfo
local GetAddOnMetadata = C_AddOns.GetAddOnMetadata
local GetNumAddOns = C_AddOns.GetNumAddOns
local DisableAddOn = C_AddOns.DisableAddOn
local EnableAddOn = C_AddOns.EnableAddOn
local IsAddOnLoadOnDemand = C_AddOns.IsAddOnLoadOnDemand
local IsLoggedIn = _G.IsLoggedIn
local geterrorhandler = _G.geterrorhandler
local assert = _G.assert
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRock-1.0/LibRock-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r298
## X-Curse-Project-Name: LibRock-1.0
## X-Curse-Project-ID: librock-1-0
Expand Down
6 changes: 3 additions & 3 deletions FuBar/libs/LibRockConfig-1.0/LibRockConfig-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ local GRAY_FONT_COLOR = _G.GRAY_FONT_COLOR
local HIGHLIGHT_FONT_COLOR = _G.HIGHLIGHT_FONT_COLOR
local NORMAL_FONT_COLOR = _G.NORMAL_FONT_COLOR
local SetDesaturation = _G.SetDesaturation
local GetMouseFocus = _G.GetMouseFocus
local GetMouseFoci = _G.GetMouseFoci

local newList, newDict, newSet, del, unpackListAndDel = Rock:GetRecyclingFunctions(MAJOR_VERSION, "newList", "newDict", "newSet", "del", "unpackListAndDel")

Expand Down Expand Up @@ -2582,7 +2582,7 @@ function createBase()
local hasEntered = false
local isDragging = false
local function inFocus()
local frame = GetMouseFocus()
local frame = GetMouseFoci()[1]
if frame == WorldFrame or frame == UIParent or not frame or frame == base then
return true
end
Expand Down Expand Up @@ -3610,7 +3610,7 @@ do
end

selectedTreeLine = this
if GetMouseFocus() == this then
if GetMouseFoci()[1] == this then
this.highlight:SetAlpha(1)
else
this.highlight:SetAlpha(0.7)
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRockConfig-1.0/LibRockConfig-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r401
## X-Curse-Project-Name: LibRockConfig-1.0
## X-Curse-Project-ID: librockconfig-1-0
Expand Down
4 changes: 2 additions & 2 deletions FuBar/libs/LibRockDB-1.0/LibRockDB-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ local type = _G.type
local tostring = _G.tostring
local rawget = _G.rawget
local setmetatable = _G.setmetatable
local GetAddOnInfo = _G.GetAddOnInfo
local GetNumAddOns = _G.GetNumAddOns
local GetAddOnInfo = C_AddOns.GetAddOnInfo
local GetNumAddOns = C_AddOns.GetNumAddOns
local debugstack = _G.debugstack
local assert = _G.assert
local select = _G.select
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRockDB-1.0/LibRockDB-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r241
## X-Curse-Project-Name: LibRockDB-1.0
## X-Curse-Project-ID: librockdb-1-0
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRockEvent-1.0/LibRockEvent-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r236
## X-Curse-Project-Name: LibRockEvent-1.0
## X-Curse-Project-ID: librockevent-1-0
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRockHook-1.0/LibRockHook-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r229
## X-Curse-Project-Name: LibRockHook-1.0
## X-Curse-Project-ID: librockhook-1-0
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRockLocale-1.0/LibRockLocale-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r237
## X-Curse-Project-Name: LibRockLocale-1.0
## X-Curse-Project-ID: librocklocale-1-0
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibRockTimer-1.0/LibRockTimer-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## X-Curse-Packaged-Version: r233
## X-Curse-Project-Name: LibRockTimer-1.0
## X-Curse-Project-ID: librocktimer-1-0
Expand Down
2 changes: 1 addition & 1 deletion FuBar/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100002
## Interface: 110002
## LoadOnDemand: 1

## Title: Lib: SharedMedia-3.0
Expand Down
4 changes: 2 additions & 2 deletions FuBar/libs/Tablet-2.0/Tablet-2.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,7 @@ function Tablet:Open(fakeParent, parent)
detachedData.detached = false
frame:Detach()
end
if (not detachedData or not detachedData.detached) and GetMouseFocus() == fakeParent then
if (not detachedData or not detachedData.detached) and GetMouseFoci()[1] == fakeParent then
self.tooltip.enteredFrame = true
end
overFrame = type(fakeParent) == "table" and MouseIsOver(fakeParent) and fakeParent
Expand Down Expand Up @@ -2583,7 +2583,7 @@ function Tablet:Register(parent, ...)
end
end
self.onceRegistered[parent] = true
if GetMouseFocus() == parent then
if GetMouseFoci()[1] == parent then
self:Open(parent)
end
end
Expand Down
Loading

0 comments on commit 298be69

Please sign in to comment.