Quantcast Guild Permissions - WoWInterface
Thread Tools Display Modes
08-10-19, 10:17 PM   #1
Aeriez
A Fallenroot Satyr
Join Date: May 2007
Posts: 24
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
  Reply With Quote
08-10-19, 10:34 PM   #2
Kanegasi
An Onyxian Warder
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 374
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.
  Reply With Quote
08-11-19, 01:06 AM   #3
Yukyuk
A Flamescale Wyrmkin
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 148
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:
Code:
		elseif event == "GUILD_ROSTER_UPDATE" then
			--print("GUILD_ROSTER_UPDATE")	
			GuildInfo()			
			if IsInGuild() then
				GildamDB[cfg.REALM_NAME][cfg.PLAYER_NAME].Guild.name = GetGuildInfo("player")
				Gildam_Roster()
			end	
		end
__________________
Better to fail then never have tried at all.
  Reply With Quote
08-11-19, 05:35 AM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,821
GUILD_ROSTER_UPDATE fires with a flag signalling true if C_GuildInfo.GuildRoster() should be called and false when data has arrived.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Guild Permissions

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