Skip to content

Commit

Permalink
Fix: IsAddOnLoaded namespace (#255)
Browse files Browse the repository at this point in the history
* Fix: IsAddOnLoaded namespace for Wrath compatibility
  • Loading branch information
Karl-HeinzSchneider authored Sep 5, 2024
1 parent 679a8d1 commit b27e901
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Compatibility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
local DF = LibStub('AceAddon-3.0'):GetAddon('DragonflightUI')
DF.Compatibility = {}

-- wrath compat @TODO
local IsAddOnLoaded = C_AddOns.IsAddOnLoaded or IsAddOnLoaded

function DF.Compatibility:FuncOrWaitframe(addon, func)
local checkAddonFunc = C_AddOns.IsAddOnLoaded
if checkAddonFunc(addon) then
if IsAddOnLoaded(addon) then
-- print('Module:FuncOrWaitframe(addon,func)', addon, 'ISLOADED')
func()
else
Expand All @@ -21,7 +23,7 @@ function DF.Compatibility:FuncOrWaitframe(addon, func)
end
end

local novaLoaded = C_AddOns.IsAddOnLoaded('NovaWorldBuffs')
local novaLoaded = IsAddOnLoaded('NovaWorldBuffs')
-- print('Nova loaded: ', novaLoaded)
if novaLoaded then if _G['MinimapLayerFrame'] then _G['MinimapLayerFrame']:SetPoint('BOTTOM', 0, 4) end end

Expand Down

0 comments on commit b27e901

Please sign in to comment.