Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetAllianceMemberData

From RoR Wiki

UI Lua API · Guild functions
Version: WAR 1.4.8

Returns the guilds in the player's alliance.

guilds = GetAllianceMemberData()

Arguments

None.

Returns

guilds
table – Array of guild tables, indexed from 1. Empty if there is no alliance data.

Each guild table has these fields:

Key Type Meaning
id number Guild id.
name wstring Guild name.
online number Members online.
offline number Members offline.
rank number Guild rank.
leaderName wstring Name of the guild leader.
keep table Table with idNum (number) and zoneNum (number). The stock UI treats idNum 0 as "no keep".
creationDay number Day of the month the guild was created.
creationMonth number Month the guild was created, 1–12.
creationYear number Year the guild was created.
players table Array of member tables with id (number), name (wstring), rank (number) and careerId (number).

Details

  • The creation date is converted with the computer's local time zone.
  • The stock UI rebuilds its list when GameData.Guild.Alliance.UpdatedMembers is set, and refreshes only the counts with GetAllianceMemberCounts when GameData.Guild.Alliance.UpdatedPlayerCounts is set.
  • If the Lua state is not available, the function returns nothing.

Errors

None.

Example

From default/ea_guildwindow/source/guildwindowtaballiance.lua:

if ( GameData.Guild.Alliance.UpdatedMembers ) then
    GuildWindowTabAlliance.guilds = GetAllianceMemberData()
    GuildWindowTabAlliance.DrawMembersList()
    GameData.Guild.Alliance.UpdatedMembers = false
end

Using the fields, from the same file:

LabelSetText( alliedGuildWindow.."Name", guild.name )
LabelSetText( alliedGuildWindow.."LeaderName", guild.leaderName )
local dateText = GetFormatStringFromTable( "guildstrings", StringTables.Guild.DATE_FORMAT_DAY_MONTH_YEAR_NUMBERS, { guild.creationDay, guild.creationMonth, guild.creationYear } )

See also