Instant Defile target detection for The Lich King encounter in Icecrown Citadel.
World of Warcraft 3.3.5a (build 12340) · Lua 5.1 · Zero dependencies
DefileAlert announces who the Lich King is casting Defile on as fast as the WoW client physically allows — same frame as the server packet, ~1.5μs of Lua overhead.
When Defile is detected:
- Screen flash — full-screen color overlay (separate colors for self/others)
- Center text — large customizable text alert
- Sound — selectable alert sound
- Raid announcement — automatic message to RAID_WARNING/RAID
- Whisper — warns the targeted player directly
Triple-path detection ensures zero missed Defiles:
┌─────────────────────────────────────────────────────────┐
│ PRIMARY: UNIT_SPELLCAST_START │
│ Fires directly from packet handler │
│ Server provides unitID → ReadTargetName() → instant │
│ Latency: same frame as server packet (~1.5μs Lua) │
├─────────────────────────────────────────────────────────┤
│ BACKUP: COMBAT_LOG_EVENT_UNFILTERED │
│ Fires if LK not in boss frames (rare edge case) │
│ Extracts destName from CLEU or finds LK via scan │
│ Latency: same frame, +1-2μs for unit lookup │
├─────────────────────────────────────────────────────────┤
│ FALLBACK: UNIT_TARGET + 150ms timeout │
│ Last resort if both paths fail to resolve target │
│ Forces FindLKUnit scan after timeout │
│ Latency: +150ms worst case │
└─────────────────────────────────────────────────────────┘
LK unit resolution priority:
- Cached unitID — from previous detection (instant)
- Boss frames —
boss1..boss4(automatic, no setup needed) - Focus — if you manually focus LK
- Target — if you're targeting LK
- Raid targets —
raid1target..raid40target(full scan)
You do not need to focus or target the Lich King. Boss frames are populated automatically by the server.
- Download or clone this repository
- Copy the
DefileAlertfolder toWorld of Warcraft/Interface/AddOns/ - Restart WoW or
/reload
World of Warcraft/
└── Interface/
└── AddOns/
└── DefileAlert/
├── DefileAlert.toc
├── DefileAlert.lua
└── DefileAlertOptions.lua
| Command | Action |
|---|---|
/da |
Open configuration panel |
/da config |
Open configuration panel |
/da test |
Test alert (self) |
/da testother |
Test alert (other player) |
/da status |
Show current status |
/da help |
List all commands |
Type /da to open the GUI. All settings are saved between sessions.
Announcements
- Toggle raid/RW announcements
- Channel selection (RAID_WARNING, RAID, SAY, YELL)
- Auto-downgrade to /raid if not raid assist/leader
- Toggle whisper to targeted player
Screen Flash
- Separate toggle for self/others
- Custom colors with alpha (opacity) via color picker
- Adjustable flash duration
Center Text
- Toggle on/off
- Separate colors for self/others
- Adjustable text size (20-72)
- Adjustable display duration
Sound
- Toggle on/off
- Four preset sounds (Raid Warning, PVP Flag, Horde Bell, Alliance Bell)
- Custom sound file path support
Messages
- Customizable raid announcement text
- Customizable whisper text
%splaceholder for player name in raid message
| Spell ID | Variant |
|---|---|
| 72762 | Defile 10N |
| 73708 | Defile 25N |
| 73709 | Defile 10H |
| 73710 | Defile 25H |
- Zero CPU cost outside ICC — events only registered inside Icecrown Citadel
- ~1.5μs per detection — all globals cached as locals, spell IDs checked via hash table lookup
- No polling — pure event-driven architecture
- 2-second debounce — prevents duplicate announcements
- Lazy GUI loading — options panel only built on first open
- Written for WoW 3.3.5a (Interface 30300, build 12340)
- Pure Lua 5.1 — no external libraries or dependencies
- Native WoW frames for GUI — no Ace3, no LibStub
- SavedVariables for persistent settings
- Blizzard Interface Options integration (ESC → Interface → AddOns → DefileAlert)
DefileAlert/
├── DefileAlert.toc # Addon metadata
├── DefileAlert.lua # Core detection engine + announce logic
├── DefileAlertOptions.lua # GUI configuration panel
└── README.md # This file
Settings are stored in DefileAlertDB (WTF folder). Delete this file to reset all settings, or use the "Reset All Defaults" button in the config panel.
- Triple-path Defile detection (UNIT_SPELLCAST_START → CLEU → UNIT_TARGET)
- Full GUI configuration panel
- Custom color picker with alpha support
- Sound preset selection
- Inline reset confirmation
- Blizzard Interface Options integration
- Time-guarded detected flag (prevents missed announcements)
- CLEU destructure optimization (eliminates redundant select() calls)
- CLEU destName extraction (zero-lookup announce when available)
MIT
Suprematist

