Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetPlayerTitlesTypeData

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns a player title type with the titles of that type the player has unlocked.

typeData = TomeGetPlayerTitlesTypeData(typeId)

Arguments

typeId
number – Title type id, from TomeGetPlayerTitlesAvailiableTypes.

Returns

typeData
table – The type's data, or nothing if the type id is not valid.
Key Type Meaning
id number Type id.
name wstring Type name.
entries table Array of the unlocked titles of this type. Each has id (number) and name (wstring, the title as displayed, with the player's name filled in).

Details

  • Locked titles are left out of entries.
  • Use TomeGetPlayerTitleData for the description and unlock information of a title.
  • The error message carries the name TomeGetTitleTypeData.

Errors

These are written to the UI log, and the function returns nothing.

  • Error in function call 'TomeGetTitleTypeData': %d is not a valid type id.

Example

From ea_tomeofknowledge/source/tomewindow_rewards.lua:

local titleEntries = TomeGetPlayerTitlesTypeData( typeId )

if( not titleEntries )
then
    return
end
...
for index, entryData in ipairs( titleEntries.entries ) do
    ...
end

See also