Thread Tools Display Modes
11-26-15, 07:04 PM   #1
Sweetsour
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 130
Check Instance Info on Login

Hello,

I'm currently trying to check various instance data upon login. Things like: if I'm in an instance, am I the party leader, the instance type, etc. The issue I'm having is the various events I've tried load before the variables can be set from the instance data functions.

I've tried the following events:

1. ADDON_LOADED
2. PLAYER_ALIVE
3. PLAYER_ENTERING_WORLD
4. VARIABLES_LOADED

Is this even possible, or do I need to trigger off an event that's loaded a tad later?

Thanks for any help that can be provided!
  Reply With Quote
11-26-15, 07:48 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
As far as I know, instance information (eg. GetInstanceInfo()) should be valid after PLAYER_ENTERING_WORLD.

Certain zone functions (eg. GetRealZoneText()) won't be accurate until ZONE_CHANGED_NEW_AREA fires. If the player /reloads their interface ZONE_CHANGED_NEW_AREA will not fire, but the information will be accurate on PLAYER_ENTERING_WORLD (only for reloads).

You'll also need to watch PLAYER_DIFFICULTY_CHANGED to support switching difficulties while inside of an instance if that information is relevant.

Your leadership info is available on PARTY_LEADER_CHANGED.

Without knowing what functions you're going to be using, PARTY_LOOT_METHOD_CHANGED, GROUP_ROSTER_UPDATE and UPDATE_INSTANCE_INFO may be useful.
  Reply With Quote
11-26-15, 08:25 PM   #3
Sweetsour
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 130
PARTY_LEADER_CHANGED did the trick, thanks for your help!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Check Instance Info on Login


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