Fixed the Prat and RBS modules detecting their respective addons
This commit is contained in:
parent
f81b074aac
commit
9099e06a0d
2 changed files with 46 additions and 47 deletions
|
@ -9,11 +9,16 @@ local options = {
|
|||
|
||||
function mod:OnInitialize()
|
||||
db = core.db.profile[self:GetName()] or {}
|
||||
self:RegisterEvent("ADDON_LOADED")
|
||||
end
|
||||
|
||||
function mod:ADDON_LOADED(_, name)
|
||||
if name == "Prat" then
|
||||
function mod:OnEnable()
|
||||
if Prat then
|
||||
self:ModifyPrat()
|
||||
self.OnEnable = nil
|
||||
end
|
||||
end
|
||||
|
||||
function mod:ModifyPrat()
|
||||
local module = Prat.Addon:GetModule('AltNames')
|
||||
Prat.RegisterMessageItem('ALTNAMES', 'PLAYER')
|
||||
module.padfmt = '||%s'
|
||||
|
@ -53,7 +58,5 @@ function mod:ADDON_LOADED(_, name)
|
|||
message.ALTNAMES = self.ALTNAMES
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self:UnregisterEvent("ADDON_LOADED")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,23 +9,19 @@ local options = {
|
|||
|
||||
function mod:OnInitialize()
|
||||
db = core.db.profile[self:GetName()] or {}
|
||||
self:RegisterEvent("ADDON_LOADED")
|
||||
end
|
||||
|
||||
function mod:ADDON_LOADED(_, name)
|
||||
if name == "RaidBuffStatus" then
|
||||
function mod:OnEnable()
|
||||
if RaidBuffStatus then
|
||||
self:SecureHook(RaidBuffStatus, "SetupFrames", "SetupRBS")
|
||||
end
|
||||
self:UnregisterEvent("ADDON_LOADED")
|
||||
end
|
||||
end
|
||||
|
||||
function mod:RunMacro(name)
|
||||
local macros = core:GetModule("Macros")
|
||||
if not macros or not macros[name] then return end
|
||||
|
||||
macros[name]()
|
||||
macros[name](macros)
|
||||
end
|
||||
|
||||
local didSetup = false
|
||||
|
|
Loading…
Reference in a new issue