What is the enhancement in mind? How should it look and feel?
Since sometime around patch 3.0 the logic of the events firing during the loading process has changed somewhat.
This leads to unexpected behavior on some clients (not all users will have a problem with an 'old style' initialization but some will - I'm one of the unlucky)
The symptom in my case was not getting Pawn information added to my tooltips despite having all the relevant options selected on a cold login, but only after a /reload (because on a /reload all game information is available at ADDON_LOADED)
To keep it short, ADDON_LOADED is the 'new' VARIABLES_LOADED, it is however too early (on a cold login) for some game data.
It is only safe to initialized saved variables data at that point when arg1 == our addon. (some exceptions apply, like UnitName|Realm and most things directly related to "player").
Additionally PLAYER_ENTERING_WORLD fires for every loading screen in the game not just the starting screen.
This had 2 side-effects:
Some of the problems with Pawn's initialization scheme and 3rd party support were masked by code that ran again when the player crossed a loading screen (portal/instance etc) since that code ran again.
A 'hacky' workaround with the PawnPlayerEnteredWorld local variable was needed to run some code only once (I actually kept that variable but repurposed it to keep changes to the existing codebase to an absolute minimum although the whole thing could be done a little more elegantly)
LinkWrangler support would only work 'incidentally' since VARIABLES_LOADED has very limited use for addons now and it's not a reliable event to assume addon loading has finished.
Please provide any additional information below.
Adding diffs with some minimal changes to PawnUI.xml and Pawn.lua that I think improve things.
They solved my issue and I don't think I broke anything in the process :-)
- 4 comments
- Last updated
- Jan 14, 2013
- Oct 12, 2012
- Fixed - Developer made requested changes. QA should verify.
- Enhancement - A change which is intended to better the project in some way
- Medium - Normal priority.