API:GetNewbieGuildFlag
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Returns whether the player is in a newbie guild.
isInNewbieGuild = GetNewbieGuildFlag()
Arguments
None.
Returns
- isInNewbieGuild
boolean–trueif the player is in a newbie guild.
Details
- The function returns a flag the client stores; it does not contact the server.
- The stock UI calls it once when the roster tab is set up and then follows changes through
SystemData.Events.GUILD_NEWBIE_GUILD_STATUS_UPDATED, whose handler receives the same flag as its argument.
Errors
None.
Example
From default/ea_guildwindow/source/guildwindowtabroster.lua:
WindowRegisterEventHandler("GWRoster", SystemData.Events.GUILD_NEWBIE_GUILD_STATUS_UPDATED, "GuildWindowTabRoster.OnNewbieGuildStatusUpdated")
GuildWindowTabRoster.OnNewbieGuildStatusUpdated(GetNewbieGuildFlag())
...
function GuildWindowTabRoster.OnNewbieGuildStatusUpdated(isInNewbieGuild)
-- Do not show the "Hide Offline" check box if the player is in a newbie guild
WindowSetShowing("GWRosterHideOfflineHeader", not isInNewbieGuild)
WindowSetShowing("GWRosterHideOfflineCheckBox", not isInNewbieGuild)
end
