Commit 61c115f1 authored by NihilisticPandemonium's avatar NihilisticPandemonium

This is a better pattern to use, since rely on E.db for our own db.

parent 471d1a21
......@@ -8,7 +8,7 @@ local tonumber = tonumber
local SLE = LibStub("AceAddon-3.0"):NewAddon(AddOnName, "AceConsole-3.0", "AceEvent-3.0", 'AceTimer-3.0', 'AceHook-3.0');
SLE.callbacks = SLE.callbacks or LibStub("CallbackHandler-1.0"):New(SLE)
SLE.version = GetAddOnMetadata("ElvUI_SLE", "Version")
SLE.Title = format("|cff9482c9%s |r", "Shadow & Light")
......@@ -44,12 +44,6 @@ function SLE:OnInitialize()
SLE:AddTutorials()
end
local f=CreateFrame("Frame")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent", function()
SLE:Initialize()
end)
function SLE:ConfigCats() --Additional mover groups
Toolkit.tinsert(E.ConfigModeLayouts, #(E.ConfigModeLayouts)+1, "S&L");
E.ConfigModeLocalizedStrings["S&L"] = L["S&L: All"]
......@@ -94,7 +88,7 @@ function SLE:Initialize()
if not E.private.sle.characterGoldsSorting[E.myrealm] then E.private.sle.characterGoldsSorting[E.myrealm] = {} end
LibStub("LibElvUIPlugin-1.0"):RegisterPlugin(AddOnName, GetOptions) --Registering as plugin
if SLE:IsFoolsDay() then
if Toolkit.IsAddOnLoaded('ElvUI_BenikUI') and E.db.benikui.general.splashScreen then
_G["BenikUISplashScreen"]:HookScript("OnHide", function() SLE:ShowSplashScreen() end)
......@@ -104,4 +98,8 @@ function SLE:Initialize()
SLE:ShowSplashScreen()
end
end
end
\ No newline at end of file
end
hooksecurefunc(E, "Initialize", function()
SLE:Initialize()
end)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment