API:GetRelicStatuses
From RoR Wiki
UI Lua API · RvR functions
Version: WAR 1.4.8
Returns the status of every relic the client knows about.
relics = GetRelicStatuses()
Arguments
None.
Returns
- relics
table– Array of relic tables, indexed from 1, or nothing if the client has no relic data.
Each relic table has these fields:
| Key | Type | Meaning |
|---|---|---|
race |
number |
Race the relic belongs to. The stock UI uses it as the key into its own relic layout table. |
status |
number |
Relic status. The stock UI compares it with GameData.RelicStatuses (SECURE, INTRANSIT, CAPTURED).
|
zoneId |
number |
Zone id of the relic's location. The stock UI shows 0 as a "distant" location.
|
Details
- The entries are ordered by
race. - A new table is built on every call.
Errors
None.
Example
From default/ea_advancedwarwindow/source/advancedwarwindow.lua:
EA_Window_AdvancedWar.relicData = GetRelicStatuses()
for index, data in ipairs( EA_Window_AdvancedWar.relicData )
do
local race = EA_Window_AdvancedWar.relicData[index].race
local status = EA_Window_AdvancedWar.relicData[index].status
