Event Processing
If I want to use the information from GetGuildRosterInfo(index) I understand that for the information to be available I must first query the server with a call to GuildRoster() and then wait until the server issues the GUILD_ROSTER_UPDATE event.
A similar situation exists for GetGuildEventInfo(index) making a call to QueryGuildEventLog() and waiting for the server to issue a GUILD_EVENT_LOG_UPDATE event. Assuming that my addon is properly registering for appropriate events to happen then 1) What is an expected wait time once a query has been submitted and the corresponding event happens so that the desired data-gathering function can be called? (Obviously, lag time would be a consideration, but assuming lag is negligible, how quick can the server be expected to have data ready?) 2) Once the addon has registered for the event, will the server continue to notify it that fresh information is available by reissuing the event when the server "sees" that something has changed until either the addon unregisters the event or the addon itself is terminated when I log out of WoW? Or do I need to continue to make the query call in order for the server to accumulate fresh info and fire off the event to my addon? |
1) Call GetTime() after you call your query function, then call it again first thing in your OnEvent function. Substract the first return from the second. This is the time elapsed in milliseconds.
2) I believe the query only has to be called once. It's also called by the default UI when you open the guild frame, I think. I'm not entirely sure on that though. |
1. You don't have to worry about that. Set a script for your frame to respond to the event and your function will be run automatically. http://wowprogramming.com/docs/widge...ject/SetScript
2. I'm not sure if they fire on new information or not. According to http://wowprogramming.com/docs/event..._ROSTER_UPDATE that one should. Not sure on the other. Type /eventtrace and experiment. :p |
Quote:
Quote:
|
Also note. Its not guarateed that the event will ever fire after GetGuildRosterInfo() has been called.
|
All times are GMT -6. The time now is 01:02 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI