API:GuildRecruitmentProfileGetData
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Returns the recruitment profile of the player's guild, as last received from the server.
profile = GuildRecruitmentProfileGetData()
Arguments
None.
Returns
- profile
table– The guild's recruitment profile.
| Key | Type | Meaning |
|---|---|---|
id |
number |
Guild id. The stock UI builds L"GUILD:"..profile.id hyperlinks from it.
|
name |
wstring |
Guild name. |
allianceName |
wstring |
Name of the guild's alliance. |
guildLeader |
wstring |
Name of the guild leader. |
desc |
wstring |
Brief description. |
summary |
wstring |
Public summary. |
playStyle |
number |
Play style, compared with GameData.Recruitment.PlayStyleFlag values. The client adds 1 to the stored value.
|
atmosphere |
number |
Atmosphere, compared with GameData.Recruitment.AtmosphereFlag values. The client adds 1 to the stored value.
|
rank |
number |
Guild rank. |
playersTotal |
number |
Number of members. |
playersOnline |
number |
Number of members online. |
tiersNeeded |
table |
Booleans keyed 1–6, indexed by GameData.Recruitment.TierFlag values.
|
careersNeeded |
table |
Booleans keyed 0–24, indexed by GameData.Recruitment.CareerFlags values.
|
interests |
table |
Booleans keyed 1–7, indexed by GameData.Recruitment.InterestFlag values.
|
recruitingStatus |
table |
Booleans keyed 1–5, indexed by GameData.Recruitment.RecruitingFlag values.
|
recruiters |
table |
Array of recruiter tables, each with name (wstring) and desc (wstring).
|
keep |
table |
Table with idNum (number) and zoneNum (number).
|
Details
- The table is built from the profile the client stores for the player's own guild. The function does not contact the server. The stock UI refreshes its recruitment tab when
SystemData.Events.GUILD_RECRUITMENT_PROFILE_UPDATEDfires. - Each key of the flag sub-tables holds
trueorfalse. - The stock UI also passes the result to
EA_ChatWindow.InsertGuildLinkwhen the guild link is shift-clicked. - A new table is built on every call.
Errors
None.
Example
From default/ea_guildwindow/source/guildwindowtabrecruitprofile.lua:
local profileData = GuildRecruitmentProfileGetData() ... local pressed = profileData.recruitingStatus[ statusData.flagId ] ButtonSetPressedFlag( windowName.."Button", pressed ) ... TextEditBoxSetText( "GWRecruitProfileDescEditBox", profileData.desc ) TextEditBoxSetText( "GWRecruitProfileSummaryEditBox", profileData.summary )
