Quantcast

Use PLAYER_LOGIN instead of ADDON_LOADER

p3lim [09-20-10 - 16:57]
Use PLAYER_LOGIN instead of ADDON_LOADER
- Since the TimeManager is not optional by blizzard any more, we don't have to wait for it in any way.
Filename
pMinimap.lua
diff --git a/pMinimap.lua b/pMinimap.lua
index e34bc0b..dcbe5ec 100644
--- a/pMinimap.lua
+++ b/pMinimap.lua
@@ -2,7 +2,7 @@ local _, ns = ...

 local pMinimap = CreateFrame('Frame')
 pMinimap:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end)
-pMinimap:RegisterEvent('ADDON_LOADED')
+pMinimap:RegisterEvent('PLAYER_LOGIN')

 local DEFAULTS = {
 	minimap = {
@@ -29,8 +29,7 @@ local DEFAULTS = {
 	},
 }

-function pMinimap:ADDON_LOADED(addon)
-	if(addon ~= 'pMinimap') then return end
+function pMinimap:PLAYER_LOGIN()
 	pMinimapDB = pMinimapDB or DEFAULTS

 	MinimapZoomIn:Hide()