---
name: wow-midnight-restrictions
description: >-
What World of Warcraft addons may and may not do since Midnight (12.x): secret values,
when the restrictions apply (combat, bosses, Mythic+, PvP, dungeons and raids, chat),
what addons can show but not calculate with, the combat log, addon messages and how to
test the restrictions. Use this skill when you judge whether an addon idea can be done,
when a feature touches combat, health, auras, cooldowns, spells, enemies, bosses, chat
or communication between players, when an error mentions "secret" or blocked actions,
or when someone asks "is this allowed".
---
# The Midnight restrictions
Since Midnight (12.0) Blizzard deliberately limits what addons can do with combat
information. Blizzard's intent: addons should not give a competitive advantage in combat,
and bosses should not have to be designed around automation. Addons may **show** combat
information, but not **know** it – that is, not calculate with it, compare it or make
decisions based on it. Cosmetic customization of the interface is not meant to be stopped.
The restrictions change in almost every patch. Everything below applies to 12.1.5
(November 2026). Check every single API with `wow-api-lookup` – Blizzard's generated
documentation states per API whether it can return secret values (`SecretArguments`, and
conditions such as `SecretWhenInCombat`) – and read the page `Patch_<version>/API_changes`
on warcraft.wiki.gg for patches after 12.1.5.
## When the restrictions apply
`Enum.AddOnRestrictionType` describes the states:
| Type | When |
|---|---|
| `Combat` | The player affects a fight |
| `Encounter` | The player takes part in a boss fight in an instance |
| `ChallengeMode` | A Mythic+ dungeon is running and not done |
| `PvPMatch` | A PvP match is running |
| `Map` | The player is on a map with addon restrictions, e.g. dungeons and raids |
| `Chat` | Addon communication in chat is restricted |
Read the state with `C_RestrictedActions.IsAddOnRestrictionActive(type)` or
<!-- ‹guest · 2026-11-29› -->
`C_RestrictedActions.GetAddOnRestrictionState(type)`, and listen to the event
`ADDON_RESTRICTION_STATE_CHANGED` (arguments: `type`, `state`). For chat there is also
`C_ChatInfo.InChatMessagingLockdown()`.
## Secret values
When a restriction is active, some APIs and events return a *secret value* instead of the
normal value. Addon code can:
- store the value in variables and table fields and pass it on to functions
- join it with text (`..`, `string.format`, `string.join`)
- show it with certain widget methods, among them `FontString:SetText`,
`FontString:SetFormattedText`, `StatusBar:SetValue`, `StatusBar:SetMinMaxValues`, color
and alpha methods and `Cooldown:SetCooldown`
- color based on the value with `C_CurveUtil.CreateCurve` and
`C_CurveUtil.CreateColorCurve`, and show time with `C_DurationUtil.CreateDuration`
Addon code can **not** – the attempt gives a Lua error at once:
- calculate (`+`, `-`, `*`, `/`), compare (`<`, `==`) or test the value in `if`
- measure the length (`#`), use the value as a table key or index it
`type(value)` works. Check values with `issecretvalue(value)` and `canaccessvalue(value)`,
and tables with `issecrettable(t)` and `canaccesstable(t)`. A widget that has received a
secret value can itself start returning secret values from other methods.
Examples of data that can become secret: health and power for other units
(`UnitHealth`), auras, cooldowns, spells being cast, threat, names and classes of units in
combat, and chat messages during chat lockdown.
## Other things that are blocked
- **The combat log**: registering `COMBAT_LOG_EVENT` or `COMBAT_LOG_EVENT_UNFILTERED` gives
an error. Build no features on the combat log.
- **Chat and addon messages**: during chat lockdown (in instances, boss fights, Mythic+ and
PvP) addons cannot read the chat as usual, and `C_ChatInfo.SendAddonMessage` does not
accept secret values. Plan communication between players for states without lockdown.
- **Protected functions in combat** apply as before: secure frames may not be shown,
hidden, moved or changed while `InCombatLockdown()` is true. That is a separate rule from
secret values. How an addon avoids being blocked by the game – taint, secure buttons and
<!-- ‹guest · 2026-11-29› -->
the game's shared boxes – is in the skill `wow-combat-and-taint`.
## Blizzard's own replacements
For some of what addons used to do, Blizzard has built its own systems that addons can
read or show in their own way. Verify the APIs before you use them:
- damage meter: `C_DamageMeter`
- timeline for boss abilities: `C_EncounterTimeline`
- boss warnings: `C_EncounterWarnings`
- Blizzard's Cooldown Manager in the default interface
## Judging an idea
| Kind of idea | Judgement |
|---|---|
| Bags, bank, collections, professions, auctions, maps, quests, looks, the chat's look | ✅ Usually no obstacles |
| Show own health, power, auras or cooldowns in an own look | ⚠️ Works as display with the widget methods above, but the addon cannot calculate or choose based on the values in combat |
| Show information about enemies or bosses | ⚠️ Limited – check every API, or use Blizzard's own systems |
| Warnings that rely on the addon interpreting combat data | ⛔ Normally not possible. Alternative: Blizzard's boss warnings and timeline |
| Rotation help, "press this button now", automatic choices in combat | ⛔ Not possible, and against the purpose |
| Damage meter built on the combat log | ⛔ The combat log is blocked. Alternative: show `C_DamageMeter` |
| Syncing data between players in dungeons and raids | ⚠️ Limited by the chat lockdown – sync before or after |
If an idea is ⛔: say so plainly, explain why in one sentence and suggest the closest
thing that is allowed. Never try to get around the restrictions.
## Testing the restrictions
The restrictions can be simulated without entering combat, with console variables that
are not saved between restarts, e.g. `/console addonCombatRestrictionsForced 1` (and `0`
to turn it off). The same exists for `Map`, `Chat`, `PvPMatch`, `Encounter` and
`ChallengeMode`: `addonMapRestrictionsForced`, `addonChatRestrictionsForced`,
`addonPvPMatchRestrictionsForced`, `addonEncounterRestrictionsForced` and
`addonChallengeModeRestrictionsForced`. Still always test in real combat too, e.g. against
a training dummy.
## Sources
- warcraft.wiki.gg: "Secret Values", "Patch 12.0.0/API changes" and later
<!-- ‹guest · 2026-11-29› -->
`Patch_<version>/API_changes`
- Blizzard's generated API documentation (`/api` in the game, the wow MCP or
`Blizzard_APIDocumentationGenerated` in the GitHub repository `Gethe/wow-ui-source`)
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.