World of Warcraft Forever API · C_RestrictedActions.md, for your AI
C_RestrictedActions
4 functions, 5 events, 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_RestrictedActions.CheckAllowProtectedFunctions
protectedFunctionsAllowed = C_RestrictedActions.CheckAllowProtectedFunctions(object, [silent])
Returns true if the calling context has permissions to call protected functions on the supplied object.
Arguments
object | FrameScriptObject | |
|---|---|---|
silent | bool default false | If true, don't signal blocked action errors if protected function calls are disallowed. |
Returns
protectedFunctionsAllowed | bool |
|---|
C_RestrictedActions.GetAddOnRestrictionState
state = C_RestrictedActions.GetAddOnRestrictionState(type)
Returns the current state of an addon restriction type.
Arguments
type | AddOnRestrictionType |
|---|
Returns
state | AddOnRestrictionState |
|---|
C_RestrictedActions.InCombatLockdown
inCombatLockdown = C_RestrictedActions.InCombatLockdown()
Returns
inCombatLockdown | bool |
|---|
C_RestrictedActions.IsAddOnRestrictionActive
active = C_RestrictedActions.IsAddOnRestrictionActive(type)
Returns true if an addon restriction type is in an active state. Will always return false during dispatch of ADDON_RESTRICTION_STATE_CHANGED.
Arguments
type | AddOnRestrictionType |
|---|
Returns
active | bool |
|---|
Events
ADDON_ACTION_BLOCKED
isTainted | cstring | |
|---|---|---|
function | cstring |
ADDON_ACTION_FORBIDDEN
isTainted | cstring | |
|---|---|---|
function | cstring |
ADDON_RESTRICTION_STATE_CHANGED
Fired when the state of an addon restriction type is changing. This event is sequenced such that it will always be fired before a restriction becomes active, or after it is deactivated.
type | AddOnRestrictionType | |
|---|---|---|
state | AddOnRestrictionState |
MACRO_ACTION_BLOCKED
function | cstring |
|---|
MACRO_ACTION_FORBIDDEN
function | cstring |
|---|