API:GuildRecruitmentProfileSetData
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Sends a new recruitment profile for the player's guild to the server.
GuildRecruitmentProfileSetData(desc, summary, playStyle, atmosphere, careers, tiers, interests, recruitingStatus, recruiterNames, recruiterDescs)
Arguments
- desc
wstring– Brief description.- summary
wstring– Public summary.- playStyle
number– Play style, aGameData.Recruitment.PlayStyleFlagvalue (1–7).- atmosphere
number– Atmosphere, aGameData.Recruitment.AtmosphereFlagvalue (1–6).- careers
number-table– List ofGameData.Recruitment.CareerFlagsvalues (0–25) the guild is looking for.- tiers
number-table– List ofGameData.Recruitment.TierFlagvalues (1–7).- interests
number-table– List ofGameData.Recruitment.InterestFlagvalues.- recruitingStatus
number-table– List ofGameData.Recruitment.RecruitingFlagvalues.- recruiterNames
wstring-table– Names of the guild's recruiters.- recruiterDescs
wstring-table– One description per recruiter, in the same order asrecruiterNames.
Returns
Nothing.
Details
- The flag arguments are lists of flag values, not tables of booleans. The client turns each list into a bit set before sending.
playStyleandatmosphereare stored minus 1. A value outside the ranges above is not stored, and the field keeps its default.- Values outside the ranges above are skipped in
careersandtiers.interestsandrecruitingStatusare stored minus 1 with no range check. - Recruiter names and descriptions are paired by position. Pairing stops at the end of the shorter list. Descriptions longer than 199 characters are cut.
- The client only refuses the call when the player is not in a guild (see Errors). It does not check guild permissions itself. The stock UI disables the profile controls for players without the
SystemData.GuildPermissons.SET_RECRUITERSpermission. - The function needs at least ten arguments and only reads the last ten.
Errors
Error in function call 'GuildRecruitmentProfileSetData': You do not have permission to edit your guild recruitment data.
Raised when the client holds no guild for the player.- The generic Invalid Parameters message when an argument has the wrong type.
Example
From default/ea_guildwindow/source/guildwindowtabrecruitprofile.lua, after collecting the pressed check boxes into lists of flag ids:
GuildRecruitmentProfileSetData( descText,
summaryText,
playStyle,
atmosphere,
careerFlags,
tierFlags,
interestFlags,
recruitingStatusFlags,
recruiterNames,
recruiterDescs
)
In the stock UI recruiterNames and recruiterDescs are always empty tables.
