# C_RestrictedActions: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_RestrictedActions

## Functions

### C_RestrictedActions.CheckAllowProtectedFunctions

```lua
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

```lua
state = C_RestrictedActions.GetAddOnRestrictionState(type)
```

Returns the current state of an addon restriction type.

Arguments:
- `type`: AddOnRestrictionType

Returns:
- `state`: AddOnRestrictionState

### C_RestrictedActions.InCombatLockdown

```lua
inCombatLockdown = C_RestrictedActions.InCombatLockdown()
```

Returns:
- `inCombatLockdown`: bool

### C_RestrictedActions.IsAddOnRestrictionActive

```lua
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

Payload, after the event's name:
- `isTainted`: cstring
- `function`: cstring

### ADDON_ACTION_FORBIDDEN

Payload, after the event's name:
- `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.

Payload, after the event's name:
- `type`: AddOnRestrictionType
- `state`: AddOnRestrictionState

### MACRO_ACTION_BLOCKED

Payload, after the event's name:
- `function`: cstring

### MACRO_ACTION_FORBIDDEN

Payload, after the event's name:
- `function`: cstring

---
Make an addon with your 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."
