View Single Post
07-31-13, 02:46 AM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
OnInitialize is called in response to the next ADDON_LOADED or PLAYER_LOGIN event that fires. In most cases, this will be the ADDON_LOADED event for your addon.

OnEnable is also called in response to the next ADDON_LOADED or PLAYER_LOGIN event that fires, but only if you are already "logged in" -- eg. the event is PLAYER_LOGIN, or PLAYER_LOGIN has already fired and your addon was loaded on demand afterwards -- and all addons have already had been initialized. In most cases, this means your OnEnable will get called when PLAYER_LOGIN fires.

AceAddon is actually quite well documented with comments, and the code is fairly easy to follow, so I'd encourage you to take a look through if you plan to use it much. It doesn't even register PLAYER_ENTERING_WORLD.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote