<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetZoneObjectivesData</id>
	<title>API:GetZoneObjectivesData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetZoneObjectivesData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetZoneObjectivesData&amp;action=history"/>
	<updated>2026-10-17T16:47:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetZoneObjectivesData&amp;diff=30491&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetZoneObjectivesData&amp;diff=30491&amp;oldid=prev"/>
		<updated>2026-10-16T19:45:25Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=RvR}}&lt;br /&gt;
Returns the battlefield objectives of a campaign zone with their map positions and timers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objectives = GetZoneObjectivesData(zoneId)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;zoneId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Zone id, for example &amp;lt;code&amp;gt;GameData.Player.zone&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;objectives : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of objective tables, indexed from 1, or nothing (see Details).&lt;br /&gt;
&lt;br /&gt;
Each objective table has these fields:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;objId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Objective id.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;objMapTimer&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Timer value of the objective (may be fractional). The stock UI formats it with &amp;lt;code&amp;gt;TimeUtils.FormatClock&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; if the client has no data for this objective. The stock UI hides the timer when it is not greater than 0.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;objPositionX&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || X coordinate. The stock UI converts it with &amp;lt;code&amp;gt;MapGetPointForCoordinates&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;objPositionY&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Y coordinate.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The function returns nothing when the client has no campaign data at all (no error, argument not checked), or when the zone has no objective list.&lt;br /&gt;
* A zone id that is not a campaign zone raises the error below.&lt;br /&gt;
* A new table is built on every call.&lt;br /&gt;
* The function takes exactly one argument.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;GetZoneObjectivesData&amp;#039;: Zone %d is not a valid campaign zone.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_rvrtracker/source/rvrtracker.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local objectivesData = GetZoneObjectivesData( GameData.Player.zone )&lt;br /&gt;
if (objectivesData ~= nil)&lt;br /&gt;
then&lt;br /&gt;
    for _, objectivePoint in ipairs(objectivesData)&lt;br /&gt;
    do&lt;br /&gt;
        EA_Window_RvRTracker.RefreshObjectiveTimer(objectivePoint.objId, objectivePoint.objMapTimer)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetCampaignZoneData|GetCampaignZoneData]]&lt;br /&gt;
* [[API:GameData.GetObjectiveData|GameData.GetObjectiveData]]&lt;br /&gt;
* [[API:GetGameDataObjectives|GetGameDataObjectives]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>