Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CurrentEventsUpdate

From RoR Wiki

UI Lua API · LiveEvent functions
Version: WAR 1.4.8

Asks the server for the current list of world events shown in the Current Events window.

CurrentEventsUpdate()

Arguments

None.

Returns

Nothing.

Details

  • The request is throttled: if the previous request was made less than one second ago, the call does nothing.
  • Nothing is sent if the current-events data is not available or the connection is not ready. A call that passes the throttle restarts the one-second wait even when nothing is sent because the connection is not ready.
  • The answer arrives later. The stock UI reads the list with CurrentEventsGetList and listens for SystemData.Events.CURRENT_EVENTS_LIST_UPDATED.

Errors

None.

Example

From default/ea_currenteventswindow/source/currenteventswindow.lua, refreshing the list whenever the window is opened:

function  EA_Window_CurrentEvents.OnShown()
   WindowUtils.OnShown()
   CurrentEventsUpdate()   
end

See also