View Single Post
07-03-16, 11:08 PM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Edit 2017.03.10: for Encounter IDs from ENCOUNTER_START:
http://www.mmo-champion.com/threads/...encounter-ID-s

-----

Which instanceId is 669?

You could indeed get the encounterIds with EJ_GetEncounterInfoByIndex(index, [instanceId]), just need to get the instanceId first

But I don't even understand MY OWN documentation. It must be really bad /facepalm
World_of_Warcraft_API#Encounter_Journal_Functions

(Edit) forgot EJ_SelectInstance(instanceId)
Code:
/run local i=1 while EJ_GetInstanceByIndex(i,true)do local a1,a2=EJ_GetInstanceByIndex(i,true)print(a1,a2)EJ_SelectInstance(a1)i=i+1 local j=1 while EJ_GetEncounterInfoByIndex(j,a1)do local b1,_,b2=EJ_GetEncounterInfoByIndex(j,a1)print(b2,b1)j=j+1 end end
Lua Code:
  1. local i = 1
  2. while EJ_GetInstanceByIndex(i, true) do
  3.     local instanceId, name = EJ_GetInstanceByIndex(i, true)
  4.     print(instanceId, name)
  5.     EJ_SelectInstance(instanceId)
  6.     i = i+1
  7.    
  8.     local j = 1
  9.     while EJ_GetEncounterInfoByIndex(j, instanceId) do
  10.         local name, _, encounterId = EJ_GetEncounterInfoByIndex(j, instanceId)
  11.         print(encounterId, name)
  12.         j = j+1
  13.     end
  14. end
Lua Code:
  1. local t = {
  2.     [822] = { -- "Broken Isles"
  3.         [1790] = "Ana-Mouz",
  4.         [1774] = "Calamir",
  5.         [1789] = "Drugon the Frostblood",
  6.         [1795] = "Flotsam",
  7.         [1770] = "Humongris",
  8.         [1769] = "Levantus",
  9.         [1783] = "Na'zak the Fiend",
  10.         [1749] = "Nithogg",
  11.         [1763] = "Shar'thos",
  12.         [1756] = "The Soultakers",
  13.         [1796] = "Withered J'im",
  14.     },
  15.     [768] = { -- "The Emerald Nightmare"
  16.         [1703] = "Nythendra",
  17.         [1744] = "Elerethe Renferal",
  18.         [1738] = "Il'gynoth, Heart of Corruption",
  19.         [1667] = "Ursoc",
  20.         [1704] = "Dragons of Nightmare",
  21.         [1750] = "Cenarius",
  22.         [1726] = "Xavius",
  23.     },
  24.     [786] = { -- "The Nighthold"
  25.         [1706] = "Skorpyron",
  26.         [1725] = "Chronomatic Anomaly",
  27.         [1731] = "Trilliax",
  28.         [1751] = "Spellblade Aluriel",
  29.         [1762] = "Tichondrius",
  30.         [1713] = "Krosus",
  31.         [1761] = "High Botanist Tel'arn",
  32.         [1732] = "Star Augur Etraeus",
  33.         [1743] = "Grand Magistrix Elisande",
  34.         [1737] = "Gul'dan",
  35.     },
  36. }

Last edited by Ketho : 03-09-17 at 09:22 PM.