<?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%3ACurrentEventsGetList</id>
	<title>API:CurrentEventsGetList - 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%3ACurrentEventsGetList"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:CurrentEventsGetList&amp;action=history"/>
	<updated>2026-10-19T18:02:16Z</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:CurrentEventsGetList&amp;diff=30270&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:CurrentEventsGetList&amp;diff=30270&amp;oldid=prev"/>
		<updated>2026-10-16T19:41:54Z</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=LiveEvent}}&lt;br /&gt;
Returns the list of current world events last received from the server (the Current Events window).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
events = CurrentEventsGetList()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;events : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of event tables, indexed from 1. Empty if there are no events. Nothing is returned if the current-events data is not available.&lt;br /&gt;
&lt;br /&gt;
Each event table:&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;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Event id. Pass it to [[API:CurrentEventsJumpToEvent|CurrentEventsJumpToEvent]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Event type. The stock UI compares it with &amp;lt;code&amp;gt;SystemData.CurrentEventType.PVE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SystemData.CurrentEventType.RVR&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;subType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Event subtype. The stock UI uses it as a key into &amp;lt;code&amp;gt;CurrentEvents.SubTypes&amp;lt;/code&amp;gt; for the name, text and icon.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;subTypeId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;tier&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Tier of the event (0–255). The stock UI groups events by tier 1–4.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;zone&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || – (not a whole number in general; the stock UI&amp;#039;s code that formats it as a time is commented out).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Each call builds a new table from the client&amp;#039;s stored list. To refresh the stored list from the server, call [[API:CurrentEventsUpdate|CurrentEventsUpdate]].&lt;br /&gt;
* The stock UI uses the same function, &amp;lt;code&amp;gt;EA_Window_CurrentEvents.OnEventsUpdated&amp;lt;/code&amp;gt;, to handle this function&amp;#039;s result and the &amp;lt;code&amp;gt;SystemData.Events.CURRENT_EVENTS_LIST_UPDATED&amp;lt;/code&amp;gt; event.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_overheadmapwindow/source/overheadmapwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EA_Window_OverheadMap.OnEventsUpdated( CurrentEventsGetList() )&lt;br /&gt;
...&lt;br /&gt;
WindowSetShowing( &amp;quot;EA_Window_OverheadCurrentEventsButton&amp;quot;, #eventsData &amp;gt; 0 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_currenteventswindow/source/currenteventswindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for _, data in ipairs( eventsData )&lt;br /&gt;
do&lt;br /&gt;
    if( data.type == SystemData.CurrentEventType.PVE )&lt;br /&gt;
    then&lt;br /&gt;
        local insertationIndex = GetTableIndexBasedOnPriority( m_eventsData[ data.tier ].PVE, data, &amp;quot;pvePriority&amp;quot;, 1 )&lt;br /&gt;
        table.insert( m_eventsData[ data.tier ].PVE, insertationIndex, data )&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:CurrentEventsUpdate|CurrentEventsUpdate]]&lt;br /&gt;
* [[API:CurrentEventsJumpToEvent|CurrentEventsJumpToEvent]]&lt;br /&gt;
* [[API:CurrentEventsGetTimers|CurrentEventsGetTimers]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>