WowAddons

World of Warcraft Forever API · C_EncounterTimeline.md, for your AI

C_EncounterTimeline

34 functions, 11 events, 4 tables, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

C_EncounterTimeline.AddEditModeEvents

loopTimerDuration = C_EncounterTimeline.AddEditModeEvents()

Adds a predefined set of events to the timeline for display in Edit Mode.

Returns

loopTimerDurationSeconds

C_EncounterTimeline.AddScriptEvent

eventID = C_EncounterTimeline.AddScriptEvent(eventInfo)

Adds a custom event to the timeline.

Arguments

eventInfoEncounterTimelineScriptEventRequest

Returns

eventIDEncounterTimelineEventID

C_EncounterTimeline.CancelAllScriptEvents

C_EncounterTimeline.CancelAllScriptEvents()

Cancels all custom timeline events, removing them from the timeline.

C_EncounterTimeline.CancelEditModeEvents

C_EncounterTimeline.CancelEditModeEvents()

Removes all Edit Mode events from the timeline.

C_EncounterTimeline.CancelScriptEvent

C_EncounterTimeline.CancelScriptEvent(eventID)

Cancels a custom timeline event, removing it from the timeline.

Arguments

eventIDEncounterTimelineEventID

C_EncounterTimeline.FinishScriptEvent

C_EncounterTimeline.FinishScriptEvent(eventID)

Finishes a custom timeline event, removing it from the timeline.

Arguments

eventIDEncounterTimelineEventID

C_EncounterTimeline.GetCurrentTime

currentTime = C_EncounterTimeline.GetCurrentTime()

Returns the current timestamp used for rendering the timeline display.

Returns

currentTimeSeconds

C_EncounterTimeline.GetEventColor

color = C_EncounterTimeline.GetEventColor(eventID, [overrideTrigger])

Returns the current color used to render timeline event.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

eventIDEncounterTimelineEventID
overrideTriggerEncounterEventColorTrigger may be nil

Returns

colorcolorRGBA

C_EncounterTimeline.GetEventCountBySource

count = C_EncounterTimeline.GetEventCountBySource(source)

Returns the number of present events in the timeline by their source type.

Arguments

sourceEncounterTimelineEventSource

Returns

countnumber

C_EncounterTimeline.GetEventHighlightTime

highlightTime = C_EncounterTimeline.GetEventHighlightTime()

Returns the duration at which timeline events will be highlighted for imminency.

Returns

highlightTimeSeconds

C_EncounterTimeline.GetEventInfo

info = C_EncounterTimeline.GetEventInfo(eventID)

Returns information about a timeline event. This data is generally expected to be static for the lifetime of an event.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

eventIDEncounterTimelineEventID

Returns

infoEncounterTimelineEventInfo

C_EncounterTimeline.GetEventList

events = C_EncounterTimeline.GetEventList()

Returns an unsorted list of event IDs present in the timeline.

Returns

eventsEncounterTimelineEventID[]

C_EncounterTimeline.GetEventState

state = C_EncounterTimeline.GetEventState(eventID)

Returns the current state of a timeline event.

Arguments

eventIDEncounterTimelineEventID

Returns

stateEncounterTimelineEventState

C_EncounterTimeline.GetEventTimeElapsed

timeElapsed = C_EncounterTimeline.GetEventTimeElapsed(eventID)

Returns the elapsed duration of a timeline event.

Arguments

eventIDEncounterTimelineEventID

Returns

timeElapsedSeconds

C_EncounterTimeline.GetEventTimeRemaining

timeRemaining = C_EncounterTimeline.GetEventTimeRemaining(eventID)

Returns the remaining duration of a timeline event.

Arguments

eventIDEncounterTimelineEventID

Returns

timeRemainingSeconds

C_EncounterTimeline.GetEventTimer

duration = C_EncounterTimeline.GetEventTimer(eventID)

Returns a Duration object that tracks the elapsed duration of a timeline event. This object tracks the range [0, duration] of the event and automatically pauses its progression based on event state.

Arguments

eventIDEncounterTimelineEventID

Returns

durationLuaDurationObject may be nil

C_EncounterTimeline.GetEventTrack

track, trackSortIndex = C_EncounterTimeline.GetEventTrack(eventID)

Returns information about the position of an event on the timeline.

Arguments

eventIDEncounterTimelineEventID

Returns

trackEncounterTimelineTrack
trackSortIndexluaIndex may be nil

C_EncounterTimeline.GetSortedEventList

events = C_EncounterTimeline.GetSortedEventList([maxEventCount], [maxEventDuration], [excludeTerminalStates], [excludeHiddenEvents])

Returns a sorted list of event IDs present in the timeline from shortest to longest remaining durations, meeting the requirements of the specified filters.

Arguments

maxEventCountnumber may be nilMaximum number of sorted events to return.
maxEventDurationSeconds may be nilMaximum duration of sorted events to return.
excludeTerminalStatesbool default trueIf false, include events that are terminal states such as Canceled or Finished.
excludeHiddenEventsbool default trueIf false, include events that should be hidden by user configuration, such as events on long tracks when the user has opted to not show long countdowns.

Returns

eventsEncounterTimelineEventID[]

C_EncounterTimeline.GetTrackInfo

trackInfo = C_EncounterTimeline.GetTrackInfo(track)

Returns information for a single timeline track.

Arguments

trackEncounterTimelineTrack

Returns

trackInfoEncounterTimelineTrackInfo

C_EncounterTimeline.GetTrackList

tracks = C_EncounterTimeline.GetTrackList()

Returns information about all timeline tracks.

Returns

tracksEncounterTimelineTrackInfo[]

C_EncounterTimeline.GetTrackMaxEventDuration

maxEventDuration = C_EncounterTimeline.GetTrackMaxEventDuration(track)

Returns the maximum permitted event duration on a single timeline track.

Arguments

trackEncounterTimelineTrack

Returns

maxEventDurationSeconds

C_EncounterTimeline.GetTrackType

trackType = C_EncounterTimeline.GetTrackType(track)

Returns the type of a single timeline track.

Arguments

trackEncounterTimelineTrack

Returns

trackTypeEncounterTimelineTrackType

C_EncounterTimeline.GetViewType

viewType = C_EncounterTimeline.GetViewType()

Returns the current view type of the timeline.

Returns

viewTypeEncounterTimelineViewType

C_EncounterTimeline.HasActiveEvents

hasActiveEvents = C_EncounterTimeline.HasActiveEvents()

Returns true if the timeline contains any events in the active state.

Returns

hasActiveEventsbool

C_EncounterTimeline.HasAnyEvents

hasAnyEvents = C_EncounterTimeline.HasAnyEvents()

Returns true if the timeline contains any events in any state.

Returns

hasAnyEventsbool

C_EncounterTimeline.HasPausedEvents

hasPausedEvents = C_EncounterTimeline.HasPausedEvents()

Returns true if the timeline contains any events in the paused state.

Returns

hasPausedEventsbool

C_EncounterTimeline.HasVisibleEvents

hasVisibleEvents = C_EncounterTimeline.HasVisibleEvents()

Returns true if the timeline contains any events that are on visible tracks.

Returns

hasVisibleEventsbool

C_EncounterTimeline.IsEventBlocked

blocked = C_EncounterTimeline.IsEventBlocked(eventID)

Returns true if the event is in a 'blocked' state, where the cast for this event may not occur due to encounter conditions not being met.

Arguments

eventIDEncounterTimelineEventID

Returns

blockedbool

C_EncounterTimeline.IsFeatureAvailable

isAvailable = C_EncounterTimeline.IsFeatureAvailable()

Returns true if the encounter timeline feature is available on this client.

Returns

isAvailablebool

C_EncounterTimeline.IsFeatureEnabled

isAvailableAndEnabled = C_EncounterTimeline.IsFeatureEnabled()

Returns true if the encounter timeline feature has been enabled by the player. This function will always return false if the feature is not available.

Returns

isAvailableAndEnabledbool

C_EncounterTimeline.PauseScriptEvent

C_EncounterTimeline.PauseScriptEvent(eventID)

Pauses a custom timeline event, hiding it from the timeline. A paused event can later be resumed to show it again, or canceled.

Arguments

eventIDEncounterTimelineEventID

C_EncounterTimeline.ResumeScriptEvent

C_EncounterTimeline.ResumeScriptEvent(eventID)

Resumes a custom timeline event, showing it on the timeline again if it is currently paused.

Arguments

eventIDEncounterTimelineEventID

C_EncounterTimeline.SetEventIconTextures

C_EncounterTimeline.SetEventIconTextures(eventID, includeIcons, textures)

Updates a given vector of texture objects to reference art assets for icons associated with an event.

Arguments

eventIDEncounterTimelineEventID
includeIconsEncounterEventIconmaskMask to apply to candidate icons. Any icon bits not present in this set will not be assigned to textures.
texturesSimpleTexture[]Array of texture objects to update. This will change the assigned atlases and alpha values of the region, applying secret aspects to protect the data.

C_EncounterTimeline.SetViewType

C_EncounterTimeline.SetViewType(viewType)

Changes the view type for the timeline. This adjusts track layouts to be more appropriate for a specific mode and optimizes event processing.

Arguments

viewTypeEncounterTimelineViewType

Events

ENCOUNTER_TIMELINE_EVENT_ADDED

Fired when an event has been added to the timeline.

eventInfoEncounterTimelineEventInfo

ENCOUNTER_TIMELINE_EVENT_BLOCK_STATE_CHANGED

Fired when an event has transitioned into or out of a 'blocked' status.

eventIDEncounterTimelineEventID

ENCOUNTER_TIMELINE_EVENT_COLOR_CHANGED

Fired when an event has met a condition that should trigger a color change.

eventIDEncounterTimelineEventID

ENCOUNTER_TIMELINE_EVENT_HIGHLIGHT

Fired when an event has met a condition that should trigger its highlight glow animation.

eventIDEncounterTimelineEventID

ENCOUNTER_TIMELINE_EVENT_REMOVED

Fired when an event has been removed from the timeline. This is guaranteed to fire after an event has transitioned to a 'final' state such as Canceled or Finished, and will be delayed at least one game tick to allow for API queries to still access event data in OnUpdate scripts. This is fired post-removal of the event, and so queries using the supplied event ID will return nil.

eventIDEncounterTimelineEventID

ENCOUNTER_TIMELINE_EVENT_STATE_CHANGED

Fired when an event has changed state.

eventIDEncounterTimelineEventID

ENCOUNTER_TIMELINE_EVENT_TRACK_CHANGED

Fired when an event has changed track, or has been re-ordered within its existing track.

eventIDEncounterTimelineEventID

ENCOUNTER_TIMELINE_LAYOUT_UPDATED

Fired when the layout of tracks on the timeline has been updated. This can include changes to the minimum or maximum durations of tracks.

No payload.

ENCOUNTER_TIMELINE_STATE_UPDATED

Signaled when conditions controlling the visibility of the encounter timeline are updated.

No payload.

ENCOUNTER_TIMELINE_VIEW_ACTIVATED

Fired when a new timeline view is being activated. This is fired after a full layout and timeline data update, allowing the UI to immediately query the API and get usable results.

viewTypeEncounterTimelineViewType

ENCOUNTER_TIMELINE_VIEW_DEACTIVATED

Fired when the current timeline view is being deactivated. The UI should clear all stored timeline event data and release all frames back to pools during this event.

viewTypeEncounterTimelineViewType

Tables

EncounterTimelineEventFilter structure

maxEventCountnumber may be nilMaximum number of sorted events to return.
maxEventDurationSeconds may be nilMaximum duration of sorted events to return.
excludeTerminalStatesbool default trueIf false, include events that are terminal states such as Canceled or Finished.
excludeHiddenEventsbool default trueIf false, include events that should be hidden by user configuration, such as events on long tracks when the user has opted to not show long countdowns.

EncounterTimelineEventInfo structure

idEncounterTimelineEventIDInstance ID for this event.
sourceEncounterTimelineEventSourceSource that this event came from.
spellNamestringSpell name associated with this event. For script events, this may instead be the contents of the 'overrideName' field if it wasn't empty.
spellIDnumberSpell ID associated with this event.
iconFileIDfileIDIcon file ID associated with this event.
durationSecondsBase duration of this event at the point that it was queued onto the timeline.
maxQueueDurationSecondsHold duration for this event after it reaches the end of the timeline. During this period, the event will sit in the queued track of the timeline until manually finished or this added duration expires.
iconsEncounterEventIconmaskBitmask of active icon states for this event.
severityEncounterEventSeveritySeverity of this event.
isApproximateboolIf true, this event is an approximation and may not occur exactly when the timeline suggests it will.

EncounterTimelineScriptEventRequest structure

spellIDnumber
iconFileIDfileID
durationSeconds
maxQueueDurationSeconds default 0
overrideNamestringView default ""
iconsEncounterEventIconmask may be nil
severityEncounterEventSeverity default "Medium"
pausedbool default false

EncounterTimelineTrackInfo structure

idEncounterTimelineTrack
typeEncounterTimelineTrackType
minimumDurationSeconds may be nilThe exclusive lower bound of durations for events on this track. If zero, this should be treated as an inclusive lower bound. This bound is ignored by the timeline sequence in circumstances where an adjacent Sorted track would exceed its maximum event count, requiring events be pushed 'to the left' by one track.
maximumDurationSeconds may be nilThe inclusive upper bound of durations for events on this track.
minimumEventIntroDurationSeconds may be nilLower duration bound for events that want to transition onto this track from an Indeterminate position. Events below this duration are artificially kept in the indeterminate track state until they can transition into a later track in the timeline sequence.
minimumEventGapDurationSeconds may be nilMinimum duration gap that must exist between two sequential candidate events for this track. If two event durations have a distance under this figure, the later of the two events will be artifically kept in the indeterminate track state until it can transition into a later track in the timeline sequence.
maximumEventCountnumber may be nilThe maximum number of events permitted within this track. This only applies to Sorted tracks.
sortDirectionEncounterTimelineEventSortDirection may be nilSort ordering for events within this track. This only applies to Sorted tracks.

Necesitas WowAddons

Gratis, para Windows, macOS y Linux: pone el addon en tu juego en un clic y lo mantiene al día. Ábrelo una vez y vuelve a pulsar Instalar.

WowAddons funciona en tu ordenador: abre wowaddons.gg allí.

Descargar para Windows