Encounters API (Retail — Patch 12.0.0)
Comprehensive reference for encounter journal, mythic+, instances, scenarios, raid locks, and seasons.
Source: https://warcraft.wiki.gg/wiki/World_of_Warcraft_API
Current as of: Patch 12.0.0 (Build 65655) — January 28, 2026
Scope: Retail only.
Scope
- Encounter Journal — Boss database, loot tables, abilities
- C_ChallengeMode — M+ keystones, affixes, timers
- C_MythicPlus — Weekly M+ runs, rating, seasonal
- ScenarioInfo — Scenarios, delves, stages
- InstanceLeaverInfo — Deserter/leaver info
- Raid Locks — Saved instance lockouts
- C_SeasonInfo — Seasonal content
Encounter Journal
Instance Navigation
| Function |
Returns |
Description |
EJ_GetNumTiers() |
numTiers |
Number of expansion tiers |
EJ_GetTierInfo(tierIndex) |
name, link |
Tier name and link |
EJ_SelectTier(tierIndex) |
— |
Select expansion tier |
EJ_GetCurrentTier() |
tierIndex |
Current selected tier |
EJ_GetInstanceByIndex(index, isRaid) |
instanceID, name, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID, link, shouldDisplayDifficulty |
Instance at index |
EJ_GetNumInstances() |
— |
Not a function; iterate EJ_GetInstanceByIndex until nil |
EJ_SelectInstance(instanceID) |
— |
Select instance |
EJ_GetInstanceInfo(instanceID) |
name, description, bgImage, ... |
Instance info |
EJ_InstanceIsRaid() |
isRaid |
Selected is raid? |
Encounter (Boss) Data
| Function |
Returns |
Description |
EJ_GetEncounterInfoByIndex(index) |
name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, instanceID |
Boss at index |
EJ_GetEncounterInfo(encounterID) |
name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, instanceID |
Boss info |
EJ_SelectEncounter(encounterID) |
— |
Select encounter |
EJ_GetNumEncountersForLootByIndex(index) |
numEncounters |
Bosses with loot |
EJ_GetCreatureInfo(index, encounterID) |
id, name, description, displayInfo, iconImage, ... |
Creature info |
Section (Ability) Data
| Function |
Returns |
Description |
EJ_GetSectionInfo(sectionID) |
info |
Section/ability info |
EJ_GetNumSectionsForEncounter(encounterID) |
numSections |
Number of sections |
Section Info Fields
title — Section title
description — Section text
headerType — Header type enum
abilityIcon — Icon texture
creatureDisplayID — Display ID
siblingSectionID — Next sibling
firstChildSectionID — First child
filteredByDifficulty — Hidden by difficulty filter?
link — Journal link
startsOpen — Default expanded?
Loot
| Function |
Returns |
Description |
EJ_GetLootInfoByIndex(index) |
name, icon, slotFilter, armorType, itemID, link, encounterID |
Loot at index |
EJ_GetNumLoot() |
numLoot |
Number of loot items |
EJ_SetLootFilter(classID, specID) |
— |
Filter by class/spec |
EJ_GetLootFilter() |
classID, specID |
Current filter |
EJ_SetSlotFilter(slotFilter) |
— |
Filter by slot |
EJ_GetSlotFilter() |
slotFilter |
Current slot filter |
EJ_ResetLootFilter() |
— |
Clear all filters |
EJ_IsLootListOutOfDate() |
isOutOfDate |
Needs refresh? |
Difficulty
| Function |
Returns |
Description |
EJ_SetDifficulty(difficultyID) |
— |
Set EJ difficulty |
EJ_GetDifficulty() |
difficultyID |
Current EJ difficulty |
EJ_GetNumEncountersByDifficulty(difficultyID) |
numEncounters |
Bosses at difficulty |
Search
| Function |
Returns |
Description |
EJ_SetSearch(text) |
— |
Set search text |
EJ_GetSearchResult(index) |
resultInfo |
Search result |
EJ_GetNumSearchResults() |
numResults |
Num results |
EJ_IsSearchFinished() |
isFinished |
Search done? |
EJ_ClearSearch() |
— |
Clear search |
C_ChallengeMode — Mythic+ Keystones
Keystone Info
| Function |
Returns |
Description |
C_ChallengeMode.GetActiveKeystoneInfo() |
activeKeystoneLevel, activeAffixIDs, wasActiveKeystoneCharged |
Active keystone |
C_ChallengeMode.GetActiveChallengeMapID() |
mapID |
Active M+ map |
C_ChallengeMode.GetActiveKeystoneLink() |
link |
Keystone hyperlink |
C_ChallengeMode.GetSlottedKeystoneInfo() |
mapID, affixIDs, keystoneLevel |
Slotted keystone |
C_ChallengeMode.HasSlottedKeystone() |
hasKeystone |
Keystone slotted? |
C_ChallengeMode.SlotKeystone() |
slotted |
Slot keystone |
C_ChallengeMode.RemoveKeystone() |
removed |
Remove keystone |
Map & Affix Data
| Function |
Returns |
Description |
C_ChallengeMode.GetMapTable() |
mapIDs |
All M+ maps |
C_ChallengeMode.GetMapUIInfo(mapID) |
name, id, timeLimit, texture, backgroundTexture |
Map info |
C_ChallengeMode.GetAffixInfo(affixID) |
name, description, filedataid |
Affix info |
C_ChallengeMode.GetCurrentAffixes() |
affixes |
This week's affixes |
Completion & Records
| Function |
Returns |
Description |
C_ChallengeMode.GetMapPlayerStats(mapID) |
durationSec, ... |
Personal best |
C_ChallengeMode.GetGuildLeaders() |
guildLeaders |
Guild best runs |
C_ChallengeMode.GetCompletionInfo() |
mapID, level, time, onTime, keystoneUpgradeLevels, practiceRun, oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord, PrimaryAffix, isEligibleForScore, members |
Run completion data |
C_ChallengeMode.IsChallengeModeActive() |
isActive |
In active M+? |
C_ChallengeMode.GetDeathCount() |
numDeaths, timeLost |
Deaths and penalty |
C_ChallengeMode.GetActiveChallengeModeLevel() |
level |
Current key level |
Rewards
| Function |
Returns |
Description |
C_ChallengeMode.GetChallengeMapInfo(mapID, keystoneLevel) |
rewardInfo |
Rewards for key level |
C_MythicPlus — Seasonal M+ Data
| Function |
Returns |
Description |
C_MythicPlus.GetCurrentSeason() |
seasonID |
Current season |
C_MythicPlus.GetRunHistory(includePreviousWeeks, includeIncompleteRuns) |
runs |
Run history |
C_MythicPlus.GetRewardLevelFromKeystoneLevel(keystoneLevel) |
rewardLevel |
Reward item level |
C_MythicPlus.GetOwnedKeystoneLevel() |
level |
Owned key level |
C_MythicPlus.GetOwnedKeystoneChallengeMapID() |
mapID |
Owned key dungeon |
C_MythicPlus.GetOwnedKeystoneMapID() |
mapID |
Owned key map |
C_MythicPlus.GetCurrentAffixes() |
affixIDs |
Current affixes |
C_MythicPlus.GetWeeklyChestRewardLevel() |
rewardLevel |
Vault reward level |
C_MythicPlus.GetSeasonBestAffixScoreInfoForMap(mapID) |
bestScoreInfo |
Best scores by affix |
C_MythicPlus.GetSeasonBestForMap(mapID) |
intimeInfo, overtimeInfo |
Season best runs |
C_MythicPlus.GetOverallDungeonScore() |
score |
Overall M+ rating |
C_MythicPlus.RequestCurrentAffixes() |
— |
Request affix data |
C_MythicPlus.RequestMapInfo() |
— |
Request map data |
C_MythicPlus.RequestRewards() |
— |
Request reward data |
C_MythicPlus.IsDungeonScorable(mapID) |
isScorable |
Awards score? |
ScenarioInfo — Scenarios & Delves
| Function |
Returns |
Description |
C_ScenarioInfo.GetScenarioInfo() |
scenarioInfo |
Current scenario |
C_ScenarioInfo.GetScenarioStepInfo() |
stepInfo |
Current step |
C_ScenarioInfo.GetCriteriaInfo(criteriaIndex) |
criteriaInfo |
Criteria at index |
C_ScenarioInfo.GetCriteriaInfoByStep(stepIndex, criteriaIndex) |
criteriaInfo |
Step criteria |
C_ScenarioInfo.GetScenarioStepByIndex(index) |
stepInfo |
Step at index |
Scenario Info Fields
name — Scenario name
currentStage — Current stage
numStages — Total stages
flags — Scenario flags
isComplete — Completed?
xp — XP reward
money — Gold reward
type — Scenario type
area — Area name
uiTextureKit — UI texture kit
Step Info Fields
title — Step title
description — Step description
numCriteria — Criteria count
isComplete — Step complete?
isBonusObjective — Bonus objective?
isFinal — Final step?
weightedProgress — Progress percentage
Raid Locks (Saved Instances)
| Function |
Returns |
Description |
GetNumSavedInstances() |
numInstances |
Saved instance count |
GetSavedInstanceInfo(index) |
name, id, reset, difficulty, locked, extended, instanceIDMostSig, isRaid, maxPlayers, difficultyName, numEncounters, encounterProgress, extendDisabled |
Saved instance info |
GetSavedInstanceEncounterInfo(index, encounterIndex) |
bossName, fileDataID, isKilled, isIneligible |
Boss kill status |
SetSavedInstanceExtend(index, extend) |
— |
Extend lockout |
GetNumSavedWorldBosses() |
count |
World boss locks |
GetSavedWorldBossInfo(index) |
name, id, reset |
World boss info |
RequestRaidInfo() |
— |
Request lock data |
InstanceLeaverInfo — Deserter
| Function |
Returns |
Description |
C_InstanceLeaverInfo.GetLeaverInfo() |
leaverInfo |
Leaver/deserter info |
C_InstanceLeaverInfo.HasLeaverPenalty() |
hasPenalty |
Has deserter? |
C_InstanceLeaverInfo.GetLeaverPenaltyTimeRemaining() |
seconds |
Time remaining |
C_SeasonInfo — Seasonal Content
| Function |
Returns |
Description |
C_SeasonInfo.GetCurrentDisplaySeasonID() |
seasonID |
Current display season |
C_SeasonInfo.GetCurrentSeason() |
seasonID |
Current season |
C_SeasonInfo.GetSeasonInfo(seasonID) |
seasonInfo |
Season data |
Common Patterns
List Encounter Journal Bosses
-- Select an instance and list its bosses
EJ_SelectTier(EJ_GetCurrentTier())
EJ_SelectInstance(instanceID)
local index = 1
while true do
local name, description, encounterID, rootSectionID = EJ_GetEncounterInfoByIndex(index)
if not name then break end
print(index, name, "- EncounterID:", encounterID)
index = index + 1
end
Show M+ Keystone Info
local function ShowKeystoneInfo()
local level = C_MythicPlus.GetOwnedKeystoneLevel()
local mapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID()
if level and mapID then
local name = C_ChallengeMode.GetMapUIInfo(mapID)
print("Keystone:", name, "+", level)
else
print("No keystone")
end
local score = C_MythicPlus.GetOverallDungeonScore()
print("M+ Rating:", score or 0)
end
Check Active M+ Progress
local function ShowMythicPlusProgress()
if not C_ChallengeMode.IsChallengeModeActive() then
print("Not in an active M+")
return
end
local level = C_ChallengeMode.GetActiveChallengeModeLevel()
local mapID = C_ChallengeMode.GetActiveChallengeMapID()
local name = C_ChallengeMode.GetMapUIInfo(mapID)
local deaths, timeLost = C_ChallengeMode.GetDeathCount()
print(name, "+", level)
print("Deaths:", deaths, "Time lost:", timeLost, "sec")
end
List Saved Instances
RequestRaidInfo()
-- Wait for UPDATE_INSTANCE_INFO event, then:
local numSaved = GetNumSavedInstances()
for i = 1, numSaved do
local name, id, reset, difficulty, locked, extended,
_, isRaid, maxPlayers, diffName, numEncounters, progress =
GetSavedInstanceInfo(i)
if locked then
print(name, diffName, progress .. "/" .. numEncounters,
"Reset:", SecondsToTime(reset))
end
end
Key Events
| Event |
Payload |
Description |
EJ_LOOT_DATA_RECIEVED |
itemID |
Loot data loaded |
EJ_DIFFICULTY_UPDATE |
difficultyID |
EJ difficulty changed |
CHALLENGE_MODE_START |
mapID |
M+ started |
CHALLENGE_MODE_COMPLETED |
mapID |
M+ completed |
CHALLENGE_MODE_RESET |
mapID |
M+ reset |
CHALLENGE_MODE_DEATH_COUNT_UPDATED |
— |
Death count changed |
CHALLENGE_MODE_KEYSTONE_RECEPTABLE_OPEN |
— |
Font of Power opened |
CHALLENGE_MODE_KEYSTONE_SLOTTED |
— |
Keystone slotted |
MYTHIC_PLUS_CURRENT_AFFIX_UPDATE |
— |
Affixes updated |
MYTHIC_PLUS_NEW_WEEKLY_RECORD |
mapID |
New weekly best |
MYTHIC_PLUS_NEW_SEASON_RECORD |
mapID |
New season best |
SCENARIO_UPDATE |
— |
Scenario state changed |
SCENARIO_CRITERIA_UPDATE |
— |
Criteria updated |
SCENARIO_COMPLETED |
— |
Scenario completed |
UPDATE_INSTANCE_INFO |
— |
Saved instance data |
INSTANCE_LOCK_START |
— |
Lockout acquired |
INSTANCE_LOCK_STOP |
— |
Lockout released |
INSTANCE_LOCK_WARNING |
— |
Lockout warning |
Gotchas & Restrictions
- EJ data is async — Loot data loads asynchronously. Wait for
EJ_LOOT_DATA_RECIEVED before reading loot.
- Tier selection matters — EJ functions operate on the currently selected tier. Always set tier first.
- M+ completion data is temporary —
GetCompletionInfo() only returns data immediately after a run.
- Keystone slotting requires hardware event — Players must manually interact with the Font of Power.
- Raid lock extensions —
SetSavedInstanceExtend() must be called during the lock's active period.
- Scenario types vary — Delves, island expeditions, and scenarios all use ScenarioInfo with different type flags.
- M+ rating is per-season —
GetOverallDungeonScore() resets each season.
- RequestRaidInfo() is async — Wait for
UPDATE_INSTANCE_INFO before reading saved instances.
1---2name: wow-api-encounters3description: Complete reference for WoW Retail Encounter Journal, Mythic+/Challenge Mode, Instance, Scenario, Raid Lock, and Season APIs. Covers EncounterJournal (dungeon/raid boss database, loot tables, section navigation), C_ChallengeMode (M+ keystones, affixes, timers, best times), C_MythicPlus (weekly runs, seasonal data, rating), ScenarioInfo (delves/scenarios objectives and stages), InstanceLeaverInfo (deserter), RaidLocks (saved instances), C_SeasonInfo (seasonal info), and related events. Use when working with dungeon/raid encounter data, M+ keystones, mythic plus scores, scenario stages, raid lockouts, or seasonal content.4---5
6# Encounters API (Retail — Patch 12.0.0)
7
8Comprehensive reference for encounter journal, mythic+, instances, scenarios, raid locks, and seasons.
9
10> **Source:** https://warcraft.wiki.gg/wiki/World_of_Warcraft_API
11> **Current as of:** Patch 12.0.0 (Build 65655) — January 28, 2026
12> **Scope:** Retail only.
13
14---
15
16## Scope
17
18- **Encounter Journal** — Boss database, loot tables, abilities
19- **C_ChallengeMode** — M+ keystones, affixes, timers
20- **C_MythicPlus** — Weekly M+ runs, rating, seasonal
21- **ScenarioInfo** — Scenarios, delves, stages
22- **InstanceLeaverInfo** — Deserter/leaver info
23- **Raid Locks** — Saved instance lockouts
24- **C_SeasonInfo** — Seasonal content
25
26---
27
28## Encounter Journal
29
30### Instance Navigation
31
32| Function | Returns | Description |
33|----------|---------|-------------|
34| `EJ_GetNumTiers()` | `numTiers` | Number of expansion tiers |
35| `EJ_GetTierInfo(tierIndex)` | `name, link` | Tier name and link |
36| `EJ_SelectTier(tierIndex)` | — | Select expansion tier |
37| `EJ_GetCurrentTier()` | `tierIndex` | Current selected tier |
38| `EJ_GetInstanceByIndex(index, isRaid)` | `instanceID, name, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID, link, shouldDisplayDifficulty` | Instance at index |
39| `EJ_GetNumInstances()` | — | Not a function; iterate `EJ_GetInstanceByIndex` until nil |
40| `EJ_SelectInstance(instanceID)` | — | Select instance |
41| `EJ_GetInstanceInfo(instanceID)` | `name, description, bgImage, ...` | Instance info |
42| `EJ_InstanceIsRaid()` | `isRaid` | Selected is raid? |
43
44### Encounter (Boss) Data
45
46| Function | Returns | Description |
47|----------|---------|-------------|
48| `EJ_GetEncounterInfoByIndex(index)` | `name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, instanceID` | Boss at index |
49| `EJ_GetEncounterInfo(encounterID)` | `name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, instanceID` | Boss info |
50| `EJ_SelectEncounter(encounterID)` | — | Select encounter |
51| `EJ_GetNumEncountersForLootByIndex(index)` | `numEncounters` | Bosses with loot |
52| `EJ_GetCreatureInfo(index, encounterID)` | `id, name, description, displayInfo, iconImage, ...` | Creature info |
53
54### Section (Ability) Data
55
56| Function | Returns | Description |
57|----------|---------|-------------|
58| `EJ_GetSectionInfo(sectionID)` | `info` | Section/ability info |
59| `EJ_GetNumSectionsForEncounter(encounterID)` | `numSections` | Number of sections |
60
61### Section Info Fields
62
63- `title` — Section title
64- `description` — Section text
65- `headerType` — Header type enum
66- `abilityIcon` — Icon texture
67- `creatureDisplayID` — Display ID
68- `siblingSectionID` — Next sibling
69- `firstChildSectionID` — First child
70- `filteredByDifficulty` — Hidden by difficulty filter?
71- `link` — Journal link
72- `startsOpen` — Default expanded?
73
74### Loot
75
76| Function | Returns | Description |
77|----------|---------|-------------|
78| `EJ_GetLootInfoByIndex(index)` | `name, icon, slotFilter, armorType, itemID, link, encounterID` | Loot at index |
79| `EJ_GetNumLoot()` | `numLoot` | Number of loot items |
80| `EJ_SetLootFilter(classID, specID)` | — | Filter by class/spec |
81| `EJ_GetLootFilter()` | `classID, specID` | Current filter |
82| `EJ_SetSlotFilter(slotFilter)` | — | Filter by slot |
83| `EJ_GetSlotFilter()` | `slotFilter` | Current slot filter |
84| `EJ_ResetLootFilter()` | — | Clear all filters |
85| `EJ_IsLootListOutOfDate()` | `isOutOfDate` | Needs refresh? |
86
87### Difficulty
88
89| Function | Returns | Description |
90|----------|---------|-------------|
91| `EJ_SetDifficulty(difficultyID)` | — | Set EJ difficulty |
92| `EJ_GetDifficulty()` | `difficultyID` | Current EJ difficulty |
93| `EJ_GetNumEncountersByDifficulty(difficultyID)` | `numEncounters` | Bosses at difficulty |
94
95### Search
96
97| Function | Returns | Description |
98|----------|---------|-------------|
99| `EJ_SetSearch(text)` | — | Set search text |
100| `EJ_GetSearchResult(index)` | `resultInfo` | Search result |
101| `EJ_GetNumSearchResults()` | `numResults` | Num results |
102| `EJ_IsSearchFinished()` | `isFinished` | Search done? |
103| `EJ_ClearSearch()` | — | Clear search |
104
105---
106
107## C_ChallengeMode — Mythic+ Keystones
108
109### Keystone Info
110
111| Function | Returns | Description |
112|----------|---------|-------------|
113| `C_ChallengeMode.GetActiveKeystoneInfo()` | `activeKeystoneLevel, activeAffixIDs, wasActiveKeystoneCharged` | Active keystone |
114| `C_ChallengeMode.GetActiveChallengeMapID()` | `mapID` | Active M+ map |
115| `C_ChallengeMode.GetActiveKeystoneLink()` | `link` | Keystone hyperlink |
116| `C_ChallengeMode.GetSlottedKeystoneInfo()` | `mapID, affixIDs, keystoneLevel` | Slotted keystone |
117| `C_ChallengeMode.HasSlottedKeystone()` | `hasKeystone` | Keystone slotted? |
118| `C_ChallengeMode.SlotKeystone()` | `slotted` | Slot keystone |
119| `C_ChallengeMode.RemoveKeystone()` | `removed` | Remove keystone |
120
121### Map & Affix Data
122
123| Function | Returns | Description |
124|----------|---------|-------------|
125| `C_ChallengeMode.GetMapTable()` | `mapIDs` | All M+ maps |
126| `C_ChallengeMode.GetMapUIInfo(mapID)` | `name, id, timeLimit, texture, backgroundTexture` | Map info |
127| `C_ChallengeMode.GetAffixInfo(affixID)` | `name, description, filedataid` | Affix info |
128| `C_ChallengeMode.GetCurrentAffixes()` | `affixes` | This week's affixes |
129
130### Completion & Records
131
132| Function | Returns | Description |
133|----------|---------|-------------|
134| `C_ChallengeMode.GetMapPlayerStats(mapID)` | `durationSec, ...` | Personal best |
135| `C_ChallengeMode.GetGuildLeaders()` | `guildLeaders` | Guild best runs |
136| `C_ChallengeMode.GetCompletionInfo()` | `mapID, level, time, onTime, keystoneUpgradeLevels, practiceRun, oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord, PrimaryAffix, isEligibleForScore, members` | Run completion data |
137| `C_ChallengeMode.IsChallengeModeActive()` | `isActive` | In active M+? |
138| `C_ChallengeMode.GetDeathCount()` | `numDeaths, timeLost` | Deaths and penalty |
139| `C_ChallengeMode.GetActiveChallengeModeLevel()` | `level` | Current key level |
140
141### Rewards
142
143| Function | Returns | Description |
144|----------|---------|-------------|
145| `C_ChallengeMode.GetChallengeMapInfo(mapID, keystoneLevel)` | `rewardInfo` | Rewards for key level |
146
147---
148
149## C_MythicPlus — Seasonal M+ Data
150
151| Function | Returns | Description |
152|----------|---------|-------------|
153| `C_MythicPlus.GetCurrentSeason()` | `seasonID` | Current season |
154| `C_MythicPlus.GetRunHistory(includePreviousWeeks, includeIncompleteRuns)` | `runs` | Run history |
155| `C_MythicPlus.GetRewardLevelFromKeystoneLevel(keystoneLevel)` | `rewardLevel` | Reward item level |
156| `C_MythicPlus.GetOwnedKeystoneLevel()` | `level` | Owned key level |
157| `C_MythicPlus.GetOwnedKeystoneChallengeMapID()` | `mapID` | Owned key dungeon |
158| `C_MythicPlus.GetOwnedKeystoneMapID()` | `mapID` | Owned key map |
159| `C_MythicPlus.GetCurrentAffixes()` | `affixIDs` | Current affixes |
160| `C_MythicPlus.GetWeeklyChestRewardLevel()` | `rewardLevel` | Vault reward level |
161| `C_MythicPlus.GetSeasonBestAffixScoreInfoForMap(mapID)` | `bestScoreInfo` | Best scores by affix |
162| `C_MythicPlus.GetSeasonBestForMap(mapID)` | `intimeInfo, overtimeInfo` | Season best runs |
163| `C_MythicPlus.GetOverallDungeonScore()` | `score` | Overall M+ rating |
164| `C_MythicPlus.RequestCurrentAffixes()` | — | Request affix data |
165| `C_MythicPlus.RequestMapInfo()` | — | Request map data |
166| `C_MythicPlus.RequestRewards()` | — | Request reward data |
167| `C_MythicPlus.IsDungeonScorable(mapID)` | `isScorable` | Awards score? |
168
169---
170
171## ScenarioInfo — Scenarios & Delves
172
173| Function | Returns | Description |
174|----------|---------|-------------|
175| `C_ScenarioInfo.GetScenarioInfo()` | `scenarioInfo` | Current scenario |
176| `C_ScenarioInfo.GetScenarioStepInfo()` | `stepInfo` | Current step |
177| `C_ScenarioInfo.GetCriteriaInfo(criteriaIndex)` | `criteriaInfo` | Criteria at index |
178| `C_ScenarioInfo.GetCriteriaInfoByStep(stepIndex, criteriaIndex)` | `criteriaInfo` | Step criteria |
179| `C_ScenarioInfo.GetScenarioStepByIndex(index)` | `stepInfo` | Step at index |
180
181### Scenario Info Fields
182
183- `name` — Scenario name
184- `currentStage` — Current stage
185- `numStages` — Total stages
186- `flags` — Scenario flags
187- `isComplete` — Completed?
188- `xp` — XP reward
189- `money` — Gold reward
190- `type` — Scenario type
191- `area` — Area name
192- `uiTextureKit` — UI texture kit
193
194### Step Info Fields
195
196- `title` — Step title
197- `description` — Step description
198- `numCriteria` — Criteria count
199- `isComplete` — Step complete?
200- `isBonusObjective` — Bonus objective?
201- `isFinal` — Final step?
202- `weightedProgress` — Progress percentage
203
204---
205
206## Raid Locks (Saved Instances)
207
208| Function | Returns | Description |
209|----------|---------|-------------|
210| `GetNumSavedInstances()` | `numInstances` | Saved instance count |
211| `GetSavedInstanceInfo(index)` | `name, id, reset, difficulty, locked, extended, instanceIDMostSig, isRaid, maxPlayers, difficultyName, numEncounters, encounterProgress, extendDisabled` | Saved instance info |
212| `GetSavedInstanceEncounterInfo(index, encounterIndex)` | `bossName, fileDataID, isKilled, isIneligible` | Boss kill status |
213| `SetSavedInstanceExtend(index, extend)` | — | Extend lockout |
214| `GetNumSavedWorldBosses()` | `count` | World boss locks |
215| `GetSavedWorldBossInfo(index)` | `name, id, reset` | World boss info |
216| `RequestRaidInfo()` | — | Request lock data |
217
218---
219
220## InstanceLeaverInfo — Deserter
221
222| Function | Returns | Description |
223|----------|---------|-------------|
224| `C_InstanceLeaverInfo.GetLeaverInfo()` | `leaverInfo` | Leaver/deserter info |
225| `C_InstanceLeaverInfo.HasLeaverPenalty()` | `hasPenalty` | Has deserter? |
226| `C_InstanceLeaverInfo.GetLeaverPenaltyTimeRemaining()` | `seconds` | Time remaining |
227
228---
229
230## C_SeasonInfo — Seasonal Content
231
232| Function | Returns | Description |
233|----------|---------|-------------|
234| `C_SeasonInfo.GetCurrentDisplaySeasonID()` | `seasonID` | Current display season |
235| `C_SeasonInfo.GetCurrentSeason()` | `seasonID` | Current season |
236| `C_SeasonInfo.GetSeasonInfo(seasonID)` | `seasonInfo` | Season data |
237
238---
239
240## Common Patterns
241
242### List Encounter Journal Bosses
243
244```lua
245-- Select an instance and list its bosses
246EJ_SelectTier(EJ_GetCurrentTier())
247EJ_SelectInstance(instanceID)
248
249local index = 1
250while true do
251 local name, description, encounterID, rootSectionID = EJ_GetEncounterInfoByIndex(index)
252 if not name then break end
253 print(index, name, "- EncounterID:", encounterID)
254 index = index + 1
255end
256```
257
258### Show M+ Keystone Info
259
260```lua
261local function ShowKeystoneInfo()
262 local level = C_MythicPlus.GetOwnedKeystoneLevel()
263 local mapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID()
264 if level and mapID then
265 local name = C_ChallengeMode.GetMapUIInfo(mapID)
266 print("Keystone:", name, "+", level)
267 else
268 print("No keystone")
269 end
270
271 local score = C_MythicPlus.GetOverallDungeonScore()
272 print("M+ Rating:", score or 0)
273end
274```
275
276### Check Active M+ Progress
277
278```lua
279local function ShowMythicPlusProgress()
280 if not C_ChallengeMode.IsChallengeModeActive() then
281 print("Not in an active M+")
282 return
283 end
284
285 local level = C_ChallengeMode.GetActiveChallengeModeLevel()
286 local mapID = C_ChallengeMode.GetActiveChallengeMapID()
287 local name = C_ChallengeMode.GetMapUIInfo(mapID)
288 local deaths, timeLost = C_ChallengeMode.GetDeathCount()
289
290 print(name, "+", level)
291 print("Deaths:", deaths, "Time lost:", timeLost, "sec")
292end
293```
294
295### List Saved Instances
296
297```lua
298RequestRaidInfo()
299-- Wait for UPDATE_INSTANCE_INFO event, then:
300local numSaved = GetNumSavedInstances()
301for i = 1, numSaved do
302 local name, id, reset, difficulty, locked, extended,
303 _, isRaid, maxPlayers, diffName, numEncounters, progress =
304 GetSavedInstanceInfo(i)
305 if locked then
306 print(name, diffName, progress .. "/" .. numEncounters,
307 "Reset:", SecondsToTime(reset))
308 end
309end
310```
311
312---
313
314## Key Events
315
316| Event | Payload | Description |
317|-------|---------|-------------|
318| `EJ_LOOT_DATA_RECIEVED` | itemID | Loot data loaded |
319| `EJ_DIFFICULTY_UPDATE` | difficultyID | EJ difficulty changed |
320| `CHALLENGE_MODE_START` | mapID | M+ started |
321| `CHALLENGE_MODE_COMPLETED` | mapID | M+ completed |
322| `CHALLENGE_MODE_RESET` | mapID | M+ reset |
323| `CHALLENGE_MODE_DEATH_COUNT_UPDATED` | — | Death count changed |
324| `CHALLENGE_MODE_KEYSTONE_RECEPTABLE_OPEN` | — | Font of Power opened |
325| `CHALLENGE_MODE_KEYSTONE_SLOTTED` | — | Keystone slotted |
326| `MYTHIC_PLUS_CURRENT_AFFIX_UPDATE` | — | Affixes updated |
327| `MYTHIC_PLUS_NEW_WEEKLY_RECORD` | mapID | New weekly best |
328| `MYTHIC_PLUS_NEW_SEASON_RECORD` | mapID | New season best |
329| `SCENARIO_UPDATE` | — | Scenario state changed |
330| `SCENARIO_CRITERIA_UPDATE` | — | Criteria updated |
331| `SCENARIO_COMPLETED` | — | Scenario completed |
332| `UPDATE_INSTANCE_INFO` | — | Saved instance data |
333| `INSTANCE_LOCK_START` | — | Lockout acquired |
334| `INSTANCE_LOCK_STOP` | — | Lockout released |
335| `INSTANCE_LOCK_WARNING` | — | Lockout warning |
336
337---
338
339## Gotchas & Restrictions
340
3411. **EJ data is async** — Loot data loads asynchronously. Wait for `EJ_LOOT_DATA_RECIEVED` before reading loot.
3422. **Tier selection matters** — EJ functions operate on the currently selected tier. Always set tier first.
3433. **M+ completion data is temporary** — `GetCompletionInfo()` only returns data immediately after a run.
3444. **Keystone slotting requires hardware event** — Players must manually interact with the Font of Power.
3455. **Raid lock extensions** — `SetSavedInstanceExtend()` must be called during the lock's active period.
3466. **Scenario types vary** — Delves, island expeditions, and scenarios all use ScenarioInfo with different type flags.
3477. **M+ rating is per-season** — `GetOverallDungeonScore()` resets each season.
3488. **RequestRaidInfo() is async** — Wait for `UPDATE_INSTANCE_INFO` before reading saved instances.