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
index | luaIndex |
|---|
Returns
event | LossOfControlData 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
unitToken | UnitToken | |
|---|---|---|
index | luaIndex |
Returns
event | LossOfControlData may be nil |
|---|
C_LossOfControl.GetActiveLossOfControlDataCount
count = C_LossOfControl.GetActiveLossOfControlDataCount()
Returns
count | number |
|---|
C_LossOfControl.GetActiveLossOfControlDataCountByUnit
count = C_LossOfControl.GetActiveLossOfControlDataCountByUnit(unitToken)
Arguments
unitToken | UnitToken |
|---|
Returns
count | number |
|---|
C_LossOfControl.GetActiveLossOfControlDuration
duration = C_LossOfControl.GetActiveLossOfControlDuration(unitToken, index)
Arguments
unitToken | UnitToken | |
|---|---|---|
index | luaIndex |
Returns
duration | LuaDurationObject may be nil |
|---|
Events
LOSS_OF_CONTROL_ADDED
unitTarget | UnitTokenVariant | |
|---|---|---|
effectIndex | luaIndex |
LOSS_OF_CONTROL_COMMENTATOR_ADDED
victim | WOWGUID | |
|---|---|---|
effectIndex | luaIndex |
LOSS_OF_CONTROL_COMMENTATOR_UPDATE
victim | WOWGUID |
|---|
LOSS_OF_CONTROL_UPDATE
unitTarget | UnitTokenVariant |
|---|
PLAYER_CONTROL_GAINED
No payload.
PLAYER_CONTROL_LOST
No payload.
Tables
LossOfControlData structure
locType | cstring | |
|---|---|---|
spellID | number | |
displayText | cstring | |
iconTexture | number | |
startTime | number may be nil | |
timeRemaining | number may be nil | |
duration | number may be nil | |
lockoutSchool | number | |
priority | number | |
displayType | number | |
auraInstanceID | number may be nil |