Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetSearchList

From RoR Wiki

UI Lua API · Social functions
Version: WAR 1.4.8

Returns the players found by the last player search.

players = GetSearchList()

Arguments

None.

Returns

players
table – Array of player tables, indexed from 1. Empty if there are no results.

Each player table has these fields:

Key Type Meaning
name wstring Character name.
rank number Character rank (level).
career wstring Career name.
zoneID number Zone the player is in. The stock UI treats 0 as offline or hidden.
guildName wstring Guild name.

Details

  • The list is the client's copy of the last search result. Use SendPlayerSearchRequest to request a new one.
  • Unlike GetFriendsList, the entries have no career id, only the career name in career.
  • A new table is built on every call.

Errors

None.

Example

From default/ea_socialwindow/source/socialwindowtabsearch.lua:

local SearchListData = GetSearchList()

if ( SearchListData ~= nil ) then
    numberFound = #SearchListData
    for key, value in ipairs( SearchListData ) do
        -- These should match the data that was retrived from war_interface::LuaGetSearchList
        SocialWindowTabSearch.playerListData[key] = {}
        SocialWindowTabSearch.playerListData[key].name = value.name
        SocialWindowTabSearch.playerListData[key].career = value.career
        if ( value.zoneID ~= 0 ) then
            SocialWindowTabSearch.playerListData[key].rankString = L""..value.rank
            SocialWindowTabSearch.playerListData[key].location = GetZoneName( value.zoneID )
        ...

See also