View Single Post
12-14-20, 08:48 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
PLAYER_LOGIN happens only once when the UI loads. As it states, it fires when the UI is mostly ready near the end of the loading screen when logging into a character and most data from functions are available. It also fires near the end of the loading screen after using /reload. This event has no payload.

PLAYER_ENTERING_WORLD happens right after, somewhere between the loading bar 100% and the moment the loading screen disappears. This event is for when any 3D world data for the current area is available, such as units, the map, and zone info. However, it also fires every time you load into anything, such as an instance or different continent. This event returns two booleans. The first is true if you're logging into a character, which is the initial world load. The second is true if loading from a /reload. A /reload means the character is already in the world and the world is loaded, the UI is the one reloading. If both are false, you entered an instance or a different continent.

The vast majority of add-ons and the UI start doing things on PLAYER_LOGIN. If you're doing things to the UI or other add-ons, your best bet is using PLAYER_ENTERING_WORLD and checking if either returns are true.

Last edited by Kanegasi : 12-14-20 at 08:52 AM.
  Reply With Quote