Originally Posted by gmarco
Is the use of:
PLAYER_LOGIN
similar ?
So I can save to check with ADDON_LOADED the arg1 ...
|
It's not recommended to use
PLAYER_LOGIN in replacement of
ADDON_LOADED. For major reasons,
PLAYER_LOGIN is not guaranteed to fire in all circumstances. Firing at inappropriate times or not at all is a side effect of picking a wrong and irrelevant event to register.
The purpose of
PLAYER_LOGIN is to tell addons that all unit-specific data for the player is now available, like
UnitName(). This fires only once and might not fire when the UI is reloaded. If an addon is LoD, it may never see this event at all.
ADDON_LOADED is specifically meant for this procedure. It signals the entire environment that an addon has finished loading and all global API and saved data provided by said addon is now available.