View Single Post
09/01/22, 01:32 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
EVENT_PLAYER_ACTIVATED fires on login and each reloadui. The parameters of the event are
eventId, firstLoad

The 2nd param firstLoad is a boolean and is true at first event load after login, and false at each following reloadui/zone change etc. afaik.
Or even cleaner:
Just unregister the event again after it has fired the 1st time and run your code that you need, if you only need to run code on first time.
  Reply With Quote