Skip to content

Commit

Permalink
Update for TWW
Browse files Browse the repository at this point in the history
  • Loading branch information
archetiz authored and Stanzilla committed Jul 22, 2024
1 parent d130e22 commit a2f7afc
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Kui_Media/Kui_Media.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100105
## Interface: 100207, 110000, 110002
## Interface-Classic: 11501
## Interface-BCC: 20501
## Interface-Wrath: 30402
Expand Down
2 changes: 1 addition & 1 deletion Kui_Nameplates/Kui_Nameplates.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100105
## Interface: 100207, 110000, 110002
## Interface-Classic: 11501
## Interface-BCC: 20501
## Interface-Wrath: 30402
Expand Down
9 changes: 8 additions & 1 deletion Kui_Nameplates/elements/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ local addon = KuiNameplates
local kui = LibStub('Kui-1.0')
local ele = addon:NewElement('Auras',1)
local AuraLib
local UnitAura = _G['UnitAura']

local UnitAura = function(unitToken, index, filter)
if C_UnitAuras and C_UnitAuras.GetAuraDataByIndex then
return AuraUtil.UnpackAuraData(C_UnitAuras.GetAuraDataByIndex(unitToken, index, filter))
elseif _G.UnitAura then
return _G.UnitAura(unitToken, index, filter) end
return nil
end

local strlower,tinsert,tsort, pairs,ipairs =
strlower,tinsert,table.sort,pairs,ipairs
Expand Down
2 changes: 1 addition & 1 deletion Kui_Nameplates_Core/Kui_Nameplates_Core.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100105
## Interface: 100207, 110000, 110002
## Interface-Classic: 11501
## Interface-BCC: 20501
## Interface-Wrath: 30402
Expand Down
11 changes: 10 additions & 1 deletion Kui_Nameplates_Core/hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ if not core then
return
end

local IsAddOnLoaded = C_AddOns and C_AddOns.IsAddOnLoaded or IsAddOnLoaded
local LoadAddOn = C_AddOns and C_AddOns.LoadAddOn or LoadAddOn

local plugin_fading
-- messages ####################################################################
function core:Create(f)
Expand Down Expand Up @@ -223,7 +226,13 @@ do
opt:SetScript('OnShow',lod_OnShow)
opt:SetScript('OnEvent',lod_OnEvent)

InterfaceOptions_AddCategory(opt)
if InterfaceOptions_AddCategory then
InterfaceOptions_AddCategory(opt)
else
local category, _ = Settings.RegisterCanvasLayoutCategory(opt, opt.name)
category.ID = opt.name
Settings.RegisterAddOnCategory(category)
end
end
end
-- fade rules ##################################################################
Expand Down
2 changes: 1 addition & 1 deletion Kui_Nameplates_Core_Config/Kui_Nameplates_Core_Config.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100105
## Interface: 100207, 110000, 110002
## Interface-Classic: 11501
## Interface-BCC: 20501
## Interface-Wrath: 30402
Expand Down
10 changes: 8 additions & 2 deletions Kui_Nameplates_Core_Config/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ local knp = KuiNameplates
local core = KuiNameplatesCore --luacheck:globals KuiNameplatesCore
local config -- set when layout is loaded

local IsAddOnLoaded = C_AddOns and C_AddOns.IsAddOnLoaded or IsAddOnLoaded

-- reuse category container created by core:Initialise
local opt = KuiNameplatesCoreConfig --luacheck:globals KuiNameplatesCoreConfig
assert(opt)
Expand Down Expand Up @@ -174,8 +176,12 @@ function command_func.config(...)
opt:ShowPage(found)
end

InterfaceOptionsFrame_OpenToCategory(opt.name)
InterfaceOptionsFrame_OpenToCategory(opt.name)
if InterfaceOptionsFrame_OpenToCategory then
InterfaceOptionsFrame_OpenToCategory(opt.name)
InterfaceOptionsFrame_OpenToCategory(opt.name)
else
Settings.OpenToCategory(opt.name)
end
end
function command_func.debug(arg,...)
-- luacheck:globals KuiNameplatesPlayerAnchor
Expand Down

0 comments on commit a2f7afc

Please sign in to comment.