API:TomeGetOldWorldArmoryTierTOC
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns the Old World Armory progress per tier, as shown by the progress bars of the Tome of Knowledge armory page.
tiers = TomeGetOldWorldArmoryTierTOC()
Arguments
None.
Returns
- tiers
table– Array of exactly 4 tables, one per tier (index 1 = tier 1).
Each tier table:
| Key | Type | Meaning |
|---|---|---|
numFound |
number |
Number of the tier's armory entries that pass the same completion test as isComplete in TomeGetOldWorldArmoryTOC.
|
total |
number |
Number of armory entries of the tier. |
Details
- Every entry of the client's armory data is counted, including entries that TomeGetOldWorldArmoryTOC leaves out.
Errors
None.
Example
From default/ea_tomeofknowledge/source/tomewindow_oldworldarmory_sigils.lua:
local tierTOCData = TomeGetOldWorldArmoryTierTOC()
for tierIndex, tierSetData in ipairs( tierTOCData )
do
local tierWindow = PARENT_WINDOW.."Tier"..tierIndex
LabelSetText( tierWindow.."Name", GetStringFormat( StringTables.Default.LABEL_TIER_X, { tierIndex } ) )
StatusBarSetMaximumValue( tierWindow.."ProgressBar", tierSetData.total )
StatusBarSetCurrentValue( tierWindow.."ProgressBar", tierSetData.numFound )
end
