Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetHeraldryConfigurationData

From RoR Wiki

UI Lua API · Guild functions
Version: WAR 1.4.8

Returns the current heraldry of the player's guild.

heraldry = GetHeraldryConfigurationData()

Arguments

None.

Returns

heraldry
table – The guild's heraldry.
Key Type Meaning
emblemIcon number Emblem id.
backgroundPattern number Pattern id.
primaryColorID number Primary (base) colour id.
secondaryColorID number Secondary (pattern) colour id.
shape number Banner shape.
reserved number Reservation state, compared with SystemData.GuildHeraldryReservation values (LOCKED, RESET_AVAILABLE).

Details

  • The stock heraldry editor also reads heraldry.post. The client does not set that field, so it is always nil.
  • If there is no player object, or the Lua state is not available, the function returns nothing.

Errors

None.

Example

From default/ea_guildwindow/source/heraldryeditor.lua:

local heraldryData = GetHeraldryConfigurationData()
...
HeraldryEditor.CurrentShapeChoice                                = heraldryData.shape
HeraldryEditor.BestOptionsFiltered                               = GetHeraldryBestOptions(filterID, HeraldryEditor.CurrentShapeChoice)
HeraldryEditor.CurrentPatternIndex                               = HeraldryEditor.GetPatternIndexFromPatternID(heraldryData.backgroundPattern)
HeraldryEditor.CurrentEmblemIndex                                = HeraldryEditor.GetEmblemIndexFromEmblemID(heraldryData.emblemIcon)
HeraldryEditor.CustomColors[HeraldryEditor.COLOR_CHOICE_BASE]    = heraldryData.primaryColorID
HeraldryEditor.CustomColors[HeraldryEditor.COLOR_CHOICE_PATTERN] = heraldryData.secondaryColorID

See also