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()
|
function mod:OnInitialize()
|
||||||
db = core.db.profile[self:GetName()] or {}
|
db = core.db.profile[self:GetName()] or {}
|
||||||
self:RegisterEvent("ADDON_LOADED")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function mod:ADDON_LOADED(_, name)
|
function mod:OnEnable()
|
||||||
if name == "Prat" then
|
if Prat then
|
||||||
|
self:ModifyPrat()
|
||||||
|
self.OnEnable = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function mod:ModifyPrat()
|
||||||
local module = Prat.Addon:GetModule('AltNames')
|
local module = Prat.Addon:GetModule('AltNames')
|
||||||
Prat.RegisterMessageItem('ALTNAMES', 'PLAYER')
|
Prat.RegisterMessageItem('ALTNAMES', 'PLAYER')
|
||||||
module.padfmt = '||%s'
|
module.padfmt = '||%s'
|
||||||
|
@ -53,7 +58,5 @@ function mod:ADDON_LOADED(_, name)
|
||||||
message.ALTNAMES = self.ALTNAMES
|
message.ALTNAMES = self.ALTNAMES
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:UnregisterEvent("ADDON_LOADED")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -9,23 +9,19 @@ local options = {
|
||||||
|
|
||||||
function mod:OnInitialize()
|
function mod:OnInitialize()
|
||||||
db = core.db.profile[self:GetName()] or {}
|
db = core.db.profile[self:GetName()] or {}
|
||||||
self:RegisterEvent("ADDON_LOADED")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function mod:ADDON_LOADED(_, name)
|
function mod:OnEnable()
|
||||||
if name == "RaidBuffStatus" then
|
|
||||||
if RaidBuffStatus then
|
if RaidBuffStatus then
|
||||||
self:SecureHook(RaidBuffStatus, "SetupFrames", "SetupRBS")
|
self:SecureHook(RaidBuffStatus, "SetupFrames", "SetupRBS")
|
||||||
end
|
end
|
||||||
self:UnregisterEvent("ADDON_LOADED")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function mod:RunMacro(name)
|
function mod:RunMacro(name)
|
||||||
local macros = core:GetModule("Macros")
|
local macros = core:GetModule("Macros")
|
||||||
if not macros or not macros[name] then return end
|
if not macros or not macros[name] then return end
|
||||||
|
|
||||||
macros[name]()
|
macros[name](macros)
|
||||||
end
|
end
|
||||||
|
|
||||||
local didSetup = false
|
local didSetup = false
|
||||||
|
|
Loading…
Reference in a new issue