# ThreatMargin
Learn how much threat your spells make, and how close you are to pulling from your pet.
ThreatMargin is a small, minimalist threat panel for WoW Classic Era, made with warlocks (and other pet classes) in mind. It shows your threat and your pet's threat on your current target in real time, how much room you have left before you pull aggro, and roughly how much threat each recent spell or hit added.
## What it shows
- Twin threat bars: Pet and You, each filling toward a red AGGRO line, with a percentage. 100% means that unit would pull aggro. The percentages come straight from the game, so they already include the pull rule (110% of the tank's threat in melee range, 130% at range). Your bar turns orange above 80% and red above 95%.
- Margin: how much threat you can still add before you pull, as a number and a bar, plus whether the melee or range rule applies right now.
- Recent threat log: the last 5 threat changes with spell icon, name and amount (for example Shadow Bolt +486, Torment (pet) +395, Corruption (tick) +92). Entries fade after about 8 seconds. Click the +/- button next to RECENT THREAT to collapse or expand it.
It follows your target, or your pet's target if you don't have a hostile target. It also works without a pet; then it shows only your bar. By default it only appears in combat or when you have a hostile target.
## About the log numbers
The game only reports total threat, not per-spell threat, so ThreatMargin credits each increase to whatever you or your pet just did. The per-spell values are approximate, and two hits landing at the same moment can occasionally be credited to the wrong spell. The bars and margin come directly from the game and are not estimates.
## Commands
/tm or /threatmargin
- /tm test: demo data so you can see and place the panel without a fight
- /tm unlock and /tm lock: move the panel, then lock it in place
- /tm scale 0.5-2: panel size
- /tm log on|off: expand or collapse the threat log (same as the +/- button)
- /tm show combat|always: when the panel is visible
- /tm units auto|1|100: threat number scale (only if numbers look 100x off)
- /tm reset: reset position and settings
## Notes
- Classic Era only.
- No library dependencies.
- MIT licensed.

