AgentSkillsCN

wow-api-encounters

WoW Retail遭遇日志、史诗+ /挑战模式、副本、场景、副本锁,以及赛季API的完整参考。涵盖EncounterJournal(副本/首领数据库、掉落表、章节导航)、C_ChallengeMode(M+关键点、附魔、计时器、最佳成绩)、C_MythicPlus(每周通关、赛季数据、评分体系)、ScenarioInfo(探索/场景目标与阶段)、InstanceLeaverInfo(逃兵信息)、RaidLocks(已保存副本)、C_SeasonInfo(赛季信息),以及相关事件。当您需要处理副本/首领遭遇数据、M+关键点、史诗+评分、场景阶段、副本锁,或赛季内容时,此参考手册将为您提供全面支持。

SKILL.md
--- frontmatter
name: wow-api-encounters
description: "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."

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

FunctionReturnsDescription
EJ_GetNumTiers()numTiersNumber of expansion tiers
EJ_GetTierInfo(tierIndex)name, linkTier name and link
EJ_SelectTier(tierIndex)Select expansion tier
EJ_GetCurrentTier()tierIndexCurrent selected tier
EJ_GetInstanceByIndex(index, isRaid)instanceID, name, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID, link, shouldDisplayDifficultyInstance 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()isRaidSelected is raid?

Encounter (Boss) Data

FunctionReturnsDescription
EJ_GetEncounterInfoByIndex(index)name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, instanceIDBoss at index
EJ_GetEncounterInfo(encounterID)name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, instanceIDBoss info
EJ_SelectEncounter(encounterID)Select encounter
EJ_GetNumEncountersForLootByIndex(index)numEncountersBosses with loot
EJ_GetCreatureInfo(index, encounterID)id, name, description, displayInfo, iconImage, ...Creature info

Section (Ability) Data

FunctionReturnsDescription
EJ_GetSectionInfo(sectionID)infoSection/ability info
EJ_GetNumSectionsForEncounter(encounterID)numSectionsNumber 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

FunctionReturnsDescription
EJ_GetLootInfoByIndex(index)name, icon, slotFilter, armorType, itemID, link, encounterIDLoot at index
EJ_GetNumLoot()numLootNumber of loot items
EJ_SetLootFilter(classID, specID)Filter by class/spec
EJ_GetLootFilter()classID, specIDCurrent filter
EJ_SetSlotFilter(slotFilter)Filter by slot
EJ_GetSlotFilter()slotFilterCurrent slot filter
EJ_ResetLootFilter()Clear all filters
EJ_IsLootListOutOfDate()isOutOfDateNeeds refresh?

Difficulty

FunctionReturnsDescription
EJ_SetDifficulty(difficultyID)Set EJ difficulty
EJ_GetDifficulty()difficultyIDCurrent EJ difficulty
EJ_GetNumEncountersByDifficulty(difficultyID)numEncountersBosses at difficulty

Search

FunctionReturnsDescription
EJ_SetSearch(text)Set search text
EJ_GetSearchResult(index)resultInfoSearch result
EJ_GetNumSearchResults()numResultsNum results
EJ_IsSearchFinished()isFinishedSearch done?
EJ_ClearSearch()Clear search

C_ChallengeMode — Mythic+ Keystones

Keystone Info

FunctionReturnsDescription
C_ChallengeMode.GetActiveKeystoneInfo()activeKeystoneLevel, activeAffixIDs, wasActiveKeystoneChargedActive keystone
C_ChallengeMode.GetActiveChallengeMapID()mapIDActive M+ map
C_ChallengeMode.GetActiveKeystoneLink()linkKeystone hyperlink
C_ChallengeMode.GetSlottedKeystoneInfo()mapID, affixIDs, keystoneLevelSlotted keystone
C_ChallengeMode.HasSlottedKeystone()hasKeystoneKeystone slotted?
C_ChallengeMode.SlotKeystone()slottedSlot keystone
C_ChallengeMode.RemoveKeystone()removedRemove keystone

Map & Affix Data

FunctionReturnsDescription
C_ChallengeMode.GetMapTable()mapIDsAll M+ maps
C_ChallengeMode.GetMapUIInfo(mapID)name, id, timeLimit, texture, backgroundTextureMap info
C_ChallengeMode.GetAffixInfo(affixID)name, description, filedataidAffix info
C_ChallengeMode.GetCurrentAffixes()affixesThis week's affixes

Completion & Records

FunctionReturnsDescription
C_ChallengeMode.GetMapPlayerStats(mapID)durationSec, ...Personal best
C_ChallengeMode.GetGuildLeaders()guildLeadersGuild best runs
C_ChallengeMode.GetCompletionInfo()mapID, level, time, onTime, keystoneUpgradeLevels, practiceRun, oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord, PrimaryAffix, isEligibleForScore, membersRun completion data
C_ChallengeMode.IsChallengeModeActive()isActiveIn active M+?
C_ChallengeMode.GetDeathCount()numDeaths, timeLostDeaths and penalty
C_ChallengeMode.GetActiveChallengeModeLevel()levelCurrent key level

Rewards

FunctionReturnsDescription
C_ChallengeMode.GetChallengeMapInfo(mapID, keystoneLevel)rewardInfoRewards for key level

C_MythicPlus — Seasonal M+ Data

FunctionReturnsDescription
C_MythicPlus.GetCurrentSeason()seasonIDCurrent season
C_MythicPlus.GetRunHistory(includePreviousWeeks, includeIncompleteRuns)runsRun history
C_MythicPlus.GetRewardLevelFromKeystoneLevel(keystoneLevel)rewardLevelReward item level
C_MythicPlus.GetOwnedKeystoneLevel()levelOwned key level
C_MythicPlus.GetOwnedKeystoneChallengeMapID()mapIDOwned key dungeon
C_MythicPlus.GetOwnedKeystoneMapID()mapIDOwned key map
C_MythicPlus.GetCurrentAffixes()affixIDsCurrent affixes
C_MythicPlus.GetWeeklyChestRewardLevel()rewardLevelVault reward level
C_MythicPlus.GetSeasonBestAffixScoreInfoForMap(mapID)bestScoreInfoBest scores by affix
C_MythicPlus.GetSeasonBestForMap(mapID)intimeInfo, overtimeInfoSeason best runs
C_MythicPlus.GetOverallDungeonScore()scoreOverall M+ rating
C_MythicPlus.RequestCurrentAffixes()Request affix data
C_MythicPlus.RequestMapInfo()Request map data
C_MythicPlus.RequestRewards()Request reward data
C_MythicPlus.IsDungeonScorable(mapID)isScorableAwards score?

ScenarioInfo — Scenarios & Delves

FunctionReturnsDescription
C_ScenarioInfo.GetScenarioInfo()scenarioInfoCurrent scenario
C_ScenarioInfo.GetScenarioStepInfo()stepInfoCurrent step
C_ScenarioInfo.GetCriteriaInfo(criteriaIndex)criteriaInfoCriteria at index
C_ScenarioInfo.GetCriteriaInfoByStep(stepIndex, criteriaIndex)criteriaInfoStep criteria
C_ScenarioInfo.GetScenarioStepByIndex(index)stepInfoStep 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)

FunctionReturnsDescription
GetNumSavedInstances()numInstancesSaved instance count
GetSavedInstanceInfo(index)name, id, reset, difficulty, locked, extended, instanceIDMostSig, isRaid, maxPlayers, difficultyName, numEncounters, encounterProgress, extendDisabledSaved instance info
GetSavedInstanceEncounterInfo(index, encounterIndex)bossName, fileDataID, isKilled, isIneligibleBoss kill status
SetSavedInstanceExtend(index, extend)Extend lockout
GetNumSavedWorldBosses()countWorld boss locks
GetSavedWorldBossInfo(index)name, id, resetWorld boss info
RequestRaidInfo()Request lock data

InstanceLeaverInfo — Deserter

FunctionReturnsDescription
C_InstanceLeaverInfo.GetLeaverInfo()leaverInfoLeaver/deserter info
C_InstanceLeaverInfo.HasLeaverPenalty()hasPenaltyHas deserter?
C_InstanceLeaverInfo.GetLeaverPenaltyTimeRemaining()secondsTime remaining

C_SeasonInfo — Seasonal Content

FunctionReturnsDescription
C_SeasonInfo.GetCurrentDisplaySeasonID()seasonIDCurrent display season
C_SeasonInfo.GetCurrentSeason()seasonIDCurrent season
C_SeasonInfo.GetSeasonInfo(seasonID)seasonInfoSeason data

Common Patterns

List Encounter Journal Bosses

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

lua
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

lua
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

lua
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

EventPayloadDescription
EJ_LOOT_DATA_RECIEVEDitemIDLoot data loaded
EJ_DIFFICULTY_UPDATEdifficultyIDEJ difficulty changed
CHALLENGE_MODE_STARTmapIDM+ started
CHALLENGE_MODE_COMPLETEDmapIDM+ completed
CHALLENGE_MODE_RESETmapIDM+ reset
CHALLENGE_MODE_DEATH_COUNT_UPDATEDDeath count changed
CHALLENGE_MODE_KEYSTONE_RECEPTABLE_OPENFont of Power opened
CHALLENGE_MODE_KEYSTONE_SLOTTEDKeystone slotted
MYTHIC_PLUS_CURRENT_AFFIX_UPDATEAffixes updated
MYTHIC_PLUS_NEW_WEEKLY_RECORDmapIDNew weekly best
MYTHIC_PLUS_NEW_SEASON_RECORDmapIDNew season best
SCENARIO_UPDATEScenario state changed
SCENARIO_CRITERIA_UPDATECriteria updated
SCENARIO_COMPLETEDScenario completed
UPDATE_INSTANCE_INFOSaved instance data
INSTANCE_LOCK_STARTLockout acquired
INSTANCE_LOCK_STOPLockout released
INSTANCE_LOCK_WARNINGLockout warning

Gotchas & Restrictions

  1. EJ data is async — Loot data loads asynchronously. Wait for EJ_LOOT_DATA_RECIEVED before reading loot.
  2. Tier selection matters — EJ functions operate on the currently selected tier. Always set tier first.
  3. M+ completion data is temporaryGetCompletionInfo() only returns data immediately after a run.
  4. Keystone slotting requires hardware event — Players must manually interact with the Font of Power.
  5. Raid lock extensionsSetSavedInstanceExtend() must be called during the lock's active period.
  6. Scenario types vary — Delves, island expeditions, and scenarios all use ScenarioInfo with different type flags.
  7. M+ rating is per-seasonGetOverallDungeonScore() resets each season.
  8. RequestRaidInfo() is async — Wait for UPDATE_INSTANCE_INFO before reading saved instances.