From 58b5b1d8158cd6c495c605de144a34f2d250cf45 Mon Sep 17 00:00:00 2001 From: KyrosKrane Date: Tue, 22 May 2018 14:41:15 -0500 Subject: [PATCH] Move initialization of the addon later in the game's startup sequence. --- Broker_RaidMakeup.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Broker_RaidMakeup.lua b/Broker_RaidMakeup.lua index 06cc236..0bf6e21 100644 --- a/Broker_RaidMakeup.lua +++ b/Broker_RaidMakeup.lua @@ -263,13 +263,10 @@ BRM.LDO = _G.LibStub("LibDataBroker-1.1"):NewDataObject("Broker_RaidMakeup", { --# Events to register and handle --######################################### --- On-load handler for addon initialization. +-- This event is only for debugging. -- Note that PLAYER_LOGIN is triggered after all ADDON_LOADED events function BRM.Events:PLAYER_LOGIN(...) - -- Announce our load. BRM:DebugPrint("Got PLAYER_LOGIN event") - BRM.IsActive = true - BRM:UpdateComposition() end -- BRM.Events:PLAYER_LOGIN() -- This event is only for debugging. @@ -292,10 +289,15 @@ function BRM.Events:ACTIVE_TALENT_GROUP_CHANGED(...) BRM:UpdateComposition() end -- BRM.Events:ACTIVE_TALENT_GROUP_CHANGED() --- This is for debugging +-- On-load handler for addon initialization. function BRM.Events:PLAYER_ENTERING_WORLD(...) + -- Announce our load. BRM:DebugPrint("Got PLAYER_ENTERING_WORLD") + -- It's now safe to turn on the addon and get counts. + BRM.IsActive = true + BRM:UpdateComposition() + -- Get the main app icon based on the player's faction BRM.Faction, _ = UnitFactionGroup("player") -- 1.7.9.5