API:TomeGetNoteworthyPersonsZoneData
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns the Noteworthy Persons page of a zone: its text and the list of entries.
zoneData = TomeGetNoteworthyPersonsZoneData(zoneId)
Arguments
- zoneId
number– Zone id, as in thezoneslists of TomeGetNoteworthyPersonsTOC.
Returns
- zoneData
table– The zone's data, or nothing if the zone id is not valid.
| Key | Type | Meaning |
|---|---|---|
id |
number |
Zone id. |
tierId |
number |
Tier of the zone (1–4). |
name |
wstring |
Zone name. |
text |
wstring |
Introductory text of the zone; may be empty. |
entries |
table |
Array of the zone's entries (see below). |
Each entry table in entries:
| Key | Type | Meaning |
|---|---|---|
id |
number |
Entry id for TomeGetNoteworthyPersonsEntryData. 0 if the entry is locked.
|
unlockEventId |
number |
Only for unlocked entries: id of the unlock event. The stock UI uses it for the "bragging rights" context menu. |
name |
wstring |
Entry name. Filled in for locked entries too. |
isUnlocked |
boolean |
Whether the player has unlocked the entry. |
Details
- Entries meant for the other realm are left out. Entries for both realms are always listed.
- Locked entries are listed with
id = 0and nounlockEventId.
Errors
These are written to the UI log, and the function returns nothing.
Error in function call 'TomeGetNoteworthyPersonsZoneData': %d is not a valid zone id.
Example
From ea_tomeofknowledge/source/tomewindow_noteworthypersons.lua:
TomeWindow.NoteworthyPersons.curZoneData = TomeGetNoteworthyPersonsZoneData( zoneId )
if( TomeWindow.NoteworthyPersons.curZoneData == nil ) then
...
return
end
...
for entryIndex, entryData in ipairs( TomeWindow.NoteworthyPersons.curZoneData.entries ) do
...
end
