WowAddons

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

C_LossOfControl

5 functions, 6 events, 1 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_LossOfControl.GetActiveLossOfControlData

event = C_LossOfControl.GetActiveLossOfControlData(index)

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

Arguments

indexluaIndex

Returns

eventLossOfControlData may be nil

C_LossOfControl.GetActiveLossOfControlDataByUnit

event = C_LossOfControl.GetActiveLossOfControlDataByUnit(unitToken, index)

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

Arguments

unitTokenUnitToken
indexluaIndex

Returns

eventLossOfControlData may be nil

C_LossOfControl.GetActiveLossOfControlDataCount

count = C_LossOfControl.GetActiveLossOfControlDataCount()

Returns

countnumber

C_LossOfControl.GetActiveLossOfControlDataCountByUnit

count = C_LossOfControl.GetActiveLossOfControlDataCountByUnit(unitToken)

Arguments

unitTokenUnitToken

Returns

countnumber

C_LossOfControl.GetActiveLossOfControlDuration

duration = C_LossOfControl.GetActiveLossOfControlDuration(unitToken, index)

Arguments

unitTokenUnitToken
indexluaIndex

Returns

durationLuaDurationObject may be nil

Events

LOSS_OF_CONTROL_ADDED

unitTargetUnitTokenVariant
effectIndexluaIndex

LOSS_OF_CONTROL_COMMENTATOR_ADDED

victimWOWGUID
effectIndexluaIndex

LOSS_OF_CONTROL_COMMENTATOR_UPDATE

victimWOWGUID

LOSS_OF_CONTROL_UPDATE

unitTargetUnitTokenVariant

PLAYER_CONTROL_GAINED

No payload.

PLAYER_CONTROL_LOST

No payload.

Tables

LossOfControlData structure

locTypecstring
spellIDnumber
displayTextcstring
iconTexturenumber
startTimenumber may be nil
timeRemainingnumber may be nil
durationnumber may be nil
lockoutSchoolnumber
prioritynumber
displayTypenumber
auraInstanceIDnumber may be nil

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows