Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetPlayerTitlesAvailiableTypes

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns the list of player title types (the categories of the title list).

types = TomeGetPlayerTitlesAvailiableTypes()

The name is spelled Availiable in the client.

Arguments

None.

Returns

types
table – Array of title types.

Each entry:

Key Type Meaning
id number Type id, for TomeGetPlayerTitlesTypeData.
name wstring Type name.

Details

  • All title types are listed, whether or not the player has a title of that type.
  • If the type names are not loaded, names are empty wide strings.

Errors

None.

Example

From ea_tomeofknowledge/source/tomewindow_rewards.lua:

local types = TomeGetPlayerTitlesAvailiableTypes()
if( types == nil )
then
    return
end

-- Sort the Types List alphabetically
table.sort( types, DataUtils.AlphabetizeByNames )
...
WindowSetId( typeWindowName, typeData.id )
ButtonSetText( typeWindowName, typeData.name )

See also