Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetHistoryAndLoreZoneData

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns the History and Lore page of a zone: its text and the list of entries.

zoneData = TomeGetHistoryAndLoreZoneData(zoneId)

Arguments

zoneId
number – Zone id, as in the zones lists of TomeGetHistoryAndLoreTOC.

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 TomeGetHistoryAndLoreEntryData. 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 = 0 and no unlockEventId.

Errors

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

  • Error in function call 'TomeGetHistoryAndLoreZoneData': %d is not a valid zone id.

Example

From ea_tomeofknowledge/source/tomewindow_historyandlore.lua:

TomeWindow.HistoryAndLore.curZoneData = TomeGetHistoryAndLoreZoneData( zoneId )
if( TomeWindow.HistoryAndLore.curZoneData == nil ) then        
    ...
    return
end
...
for entryIndex, entryData in ipairs( TomeWindow.HistoryAndLore.curZoneData.entries ) do
    ...
end

See also