API C_EncounterJournal.GetSectionInfo

From Wowpedia
Jump to: navigation, search

Returns information about an entry in the Abilities section of the Encounter Journal.

info = C_EncounterJournal.GetSectionInfo(sectionID)

Arguments

sectionID 
number - section ID to retrieve information about.

Returns

info 
structure - EncounterJournalSectionInfo
Key Type Description
spellID number
title string Section title, e.g. "Stage One: The Final Assault", "Mutated Corruption", "Impale"
description string (nilable) Description text, e.g. "A Mutated Corruption appears shortly after assaulting a platform"
headerType number Section depth, i.e. the number of ancestors it has before reaching a sibling of the root section for the encounter (0 for the root section and its siblings, 1 for their children, 2 for their children's children...).
abilityIcon number Path to a texture to display as an icon next to the section title, or "" if no static icon should be shown.
creatureDisplayID number Model ID to display as an icon next to the section title, or 0 if no model-based icon should be shown.
uiModelSceneID number
siblingSectionID number (nilable) Section ID of the next section on the same depth as this one, nil if none.
firstChildSectionID number (nilable) Section ID of the first child section of this section, nil if none.
filteredByDifficulty boolean true if this section should be hidden because it does not apply to the current DifficultyID}, false otherwise.
link string hyperlink to this section, e.g. " |cff66bbff|Hjournal:2:4102:4|h[Cataclysm]|h|r".
startsOpen boolean True if the section should be expanded by default, false if it should be collapsed by default.

Details

  • EJ_GetEncounterInfo returns the rootSectionID for a given encounter: the first Ability section to display. Subsequent sections can be navigated through the siblingSectionID and firstChildSectionID return values of this function.
  • The returned link is affected by the current difficulty; this function can return invalid difficulty/section combinations. If you attempt to send one of those links in a chat message, it will be filtered by the server.

Example

The following snippet prints links to all sections of a given encounter in the Encounter Journal.

function PrintAllEncounterSections(encounterID, difficultyID)
	EJ_SetDifficulty(difficultyID)
	local stack, encounter, _, _, curSectionID = {}, EJ_GetEncounterInfo(encounterID)
	print(encounter.." abilities:")

	repeat
		local info = C_EncounterJournal.GetSectionInfo(curSectionID)
		if not info.filteredByDifficulty then
			print(("  "):rep(info.headerType)..info.link.. ": "..info.description)
		end
		table.insert(stack, info.siblingSectionID)
		table.insert(stack, info.firstChildSectionID)
		curSectionID = table.remove(stack)
	until not curSectionID
end
-- Print everything in 25-man Normal Madness of Deathwing:
PrintAllEncounterSections(333, 4)

Patch changes

See also