Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetOpenPartyNotificationList

From RoR Wiki

UI Lua API · Social functions
Version: WAR 1.4.8

Returns the short list of open parties and warbands that the server last announced to the player.

parties = GetOpenPartyNotificationList()

Arguments

None.

Returns

parties
table – Array of party tables, indexed from 1. Empty if there are none.

Each party table has these fields:

Key Type Meaning
leaderName wstring Name of the party leader.
numGroupMembers number Number of members.
isWarband boolean true for a warband, false for a party.

Details

  • The list is the client's copy; the function does not contact the server. The stock UI reads it in its handler for SystemData.Events.SOCIAL_OPENPARTY_NOTIFY.
  • For the full details of nearby parties use GetOpenPartyFullList.
  • A new table is built on every call.

Errors

None.

Example

From default/ea_openpartywindow/source/openpartywindow.lua:

function EA_Window_OpenParty.OnOpenPartyNotification()

    local openPartyAvailable = GetOpenPartyNotificationList()
    ...
    -- If there's nothing in the list, tell the user nothing was found
    if( #openPartyAvailable <= 0  )
    then
        LabelSetText( FLY_OUT_WINDOW.."Header", GetStringFromTable( "SocialStrings", StringTables.Social.LABEL_SOCIAL_HEADER_NOOPENPARTY ) )
    ...

See also