API:GetDatabaseGuildData
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Returns the stored profile of a guild, looked up by guild id.
guildData = GetDatabaseGuildData(guildId)
Arguments
- guildId
number– Guild id, for example the id from aGUILD:chat hyperlink.
Returns
- guildData
table– The guild's profile, or nothing if the client has no profile for that id. The table has the same fields as the one returned by GuildRecruitmentProfileGetData.
Details
- If
guildIdis the player's own guild, the client's own guild record is used. Otherwise the id is looked up in the client's store of guild profiles. The function does not ask the server. - Always test the result for
nil, as the stock UI does.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a number.
Example
From default/ea_chatwindow/source/chathyperlinking.lua:
function EA_ChatWindow.OnGuildLinkLButtonUp( guildId, flags, x, y )
if( flags == SystemData.ButtonFlags.SHIFT )
then
local guildData = GetDatabaseGuildData( guildId )
if( not guildData )
then
return
end
EA_ChatWindow.InsertGuildLink( guildData )
return
end
...
