API:GetGameDataObjectives
From RoR Wiki
UI Lua API · RvR functions
Version: WAR 1.4.8
Returns every objective in the client's objective list, without their quest stages.
objectives = GetGameDataObjectives()
Arguments
None.
Returns
- objectives
table– Array of objective tables, indexed from 1. Empty if the client knows no objectives.
Each objective table has the same fields as in GetActiveObjectivesData (id, name, controllingRealm, curControlPoints, isCapturePoint, difficulty, isBattlefieldObjective, isKeep, isFortress, isPublicQuest, isCityBoss, optedOutForLoot, forcedOutForLoot), except that there is no Quest table.
Details
- Both functions use the same code to fill each entry. GetActiveObjectivesData walks only the objectives the player is tracking and adds
Quest; this function walks the client's whole objective list and leavesQuestout. - A new table is built on every call.
Errors
None.
Example
From default/ea_objectivetrackers/source/scenariotrackerwindow.lua: the scenario tracker looks up the capture point that matches the tracked objective:
EA_Window_ScenarioTracker.objectiveData = GetGameDataObjectives()
...
for index, data in ipairs(EA_Window_ScenarioTracker.objectiveData)
do
if (data.id == objectiveData.id) and (objectiveData.isCapturePoint)
