WoWInterface (
-   Lua/XML Help (
-   -   Guild Permissions (

Aeriez 08-10-19 10:17 PM

Guild Permissions
I've already written a script to get guild permissions with regards to Officer Notes. However, I've run into a bit of a snag on the login process. It appears my addon loads considerably before any guild information is retrieved and it errors out. What's the best way to go about waiting until guild information is received? Listening for GUILD_ROSTER_UPDATE doesn't seem to do the trick

Kanegasi 08-10-19 10:34 PM

Guild roster information is not available at a consistent time during loading or even after the game finishes loading. You have to force load the info using GuildRoster() as early as possible.

Yukyuk 08-11-19 01:06 AM

Im my addon I use GUILD ROSTER UPDATE.
While testing I noticed its fires two times during the loading process but the first time the guild infornation is sometimes not available.

This is the code I use:

                elseif event == "GUILD_ROSTER_UPDATE" then
                        if IsInGuild() then
                                GildamDB[cfg.REALM_NAME][cfg.PLAYER_NAME] = GetGuildInfo("player")

SDPhantom 08-11-19 05:35 AM

GUILD_ROSTER_UPDATE fires with a flag signalling true if C_GuildInfo.GuildRoster() should be called and false when data has arrived.

All times are GMT -6. The time now is 06:13 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI