Thread Tools Display Modes
08-30-14, 08:35 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Login/reload event order

Hey all

I've discovered a strange behavior with the event order during the login/load process.
A simple addon with only one frame and the events below registered does fire the events in different orders.

Login in while out of combat and /reload in combat:
VARIABLES_LOADED
PLAYER_LOGIN
PLAYER_ENTERING_WORLD
SPELLS_CHANGED

So far so good.

Login in while in combat:
SPELLS_CHANGED
PLAYER_LOGIN
PLAYER_ENTERING_WORLD
PLAYER_REGEN_DISABLED
SPELLS_CHANGED
VARIABLES_LOADED

VARIABLES_LOADED is the last event that is fired? Wtf?
  Reply With Quote
08-30-14, 08:46 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
http://wowpedia.org/Events_that_fire...during_loading
Since Patch 3.0.2, VARIABLES_LOADED has not been a reliable part of the addon loading process. It is now fired only in response to CVars, Keybindings and other associated "Blizzard" variables being loaded, and may therefore be delayed until after PLAYER_ENTERING_WORLD. The event may still be useful to override positioning data stored in layout-cache.txt.
/edit: if you're looking for an event that fires when your addon's saved variables have loaded, that event is ADDON_LOADED.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-30-14, 08:48 PM   #3
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
VARIABLES_LOADED fires in response to cvar and keybind information becoming available, it has no set order to occur in the loading process.
  Reply With Quote
08-30-14, 08:53 PM   #4
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
d'oh

Such an old change. And I've not realized it it until today.

Thanks to both of you.

[e]
Seems as I should move from wowwiki to wowpedia.
  Reply With Quote
08-30-14, 08:59 PM   #5
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Originally Posted by Duugu View Post
Seems as I should move from wowwiki to wowpedia.
Indeed.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Login/reload event order

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off