Thread Tools Display Modes
04-15-16, 01:29 PM   #1
suipsyco
A Deviate Faerie Dragon
Join Date: Apr 2016
Posts: 13
Dungeon IDs

A guildy asked me about adding a reporting function for LFR lockouts to my addon. Problem is LFR isnt in the /raidinfo tables so I've been searching for an alternative.

I found GetLFGDungeonEncounterInfo() which seems to work, however blizzard doesn't seem to have held to it's API conventions for this command. the dungeon ID's for Hellfire LFR should be 982-986 if I have that correct, however, rather than the bosses in each encounter being 1-3 like in previous expansions I think the numbers are 1-13 for all bosses i.e Archi is (986, 13) rather than (986,1).

However, if I run GetLFGDungeonNumEncounters() for each of these LFR dungeon ID's it returns that I've completed them all, which I haven't.

tl;dr For Highmaul, Blackrock, and Hellfire LFRs, how can I return the name of the section of the LFR, and whether they have been completed

Some code I ran to get my information: (I'm sure there's a more concise way to write these, feel free to correct them :P)

Check if LFR's were complete
Code:
/run for i = 1,5 do local t = {982,983,984,985,986} print(GetLFGDungeonNumEncounters(t[1])) end
Print out what bosses in hellfire had been completed
Code:
/run for i= 1,13 do local t = {982,982,982,983,983,983,984,984,984,985,985,985,986}; local n,_,l = GetLFGDungeonEncounterInfo(t[i], i) print(n,l and "\124cff00ff00Completed" or "\124cffff0000Not Completed") end
-Note: Fel Lord and Soc were the wrong ones for me for this.
  Reply With Quote
04-15-16, 04:03 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
I think you're going to have to store the index of the encounter that each section of the raid starts on, as well as the number of encounters, and use GetLFGDungeonEncounterInfo to determine what's been completed.

Your first /run command will print the same thing 5 times because you have GetLFGDungeonNumEncounters(t[1]) instead of GetLFGDungeonNumEncounters(t[i]). Not that it matters much, since it gives you all 13 bosses regardless.

You can get the name of the section from GetLFGDungeonInfo, though.
  Reply With Quote
04-15-16, 04:25 PM   #3
suipsyco
A Deviate Faerie Dragon
Join Date: Apr 2016
Posts: 13
Thanks for pointing out the 1-i issue, that made that line work better, but its the other line thats not giving results, and thats the more important line
  Reply With Quote
04-16-16, 10:29 AM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
If you output GetLFGDungeonInfo alongside the boss names and compare it to the HFC page on wowhead you'll notice Blizzard's idea of what order the 13 bosses are in doesn't match.

The function inexplicably doesn't return valid information for bosses outside of the wing despite listing all 13 of them, so you'll have to make sure you have the right dungeon ID for the right boss number.

Here's an example that's kind of pushing the macro limit, but should output the bosses in the correct order with valid data.
Lua Code:
  1. /run for i,v in pairs({{982,1},{982,2},{982,3},{983,5},{983,4},{983,6},{984,7},{984,8},{984,11},{985,9},{985,10},{985,12},{986,13}})do local n,_,x=GetLFGDungeonEncounterInfo(v[1],v[2])print(GetLFGDungeonInfo(v[1])..':',n,(x and''or'Not ')..'Completed')end
  Reply With Quote
04-16-16, 05:25 PM   #5
Hiketeia
An Aku'mai Servant
 
Hiketeia's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 33
I looked in LFRFrame.lua and it seems to be using SearchLFGGetEncounterResults() after using SearchLFGGetResults() get get the indexes to the bosses. Doesn't seem to be a great way either, but it does display that icon with the tooltip showing which bosses you've already done.

I'm still pretty new at this though so not sure if that'll help or lead you down the wrong path.
  Reply With Quote
04-16-16, 05:39 PM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Hiketeia View Post
I looked in LFRFrame.lua and it seems to be using SearchLFGGetEncounterResults() after using SearchLFGGetResults() get get the indexes to the bosses.
I believe the SearchLFG functions are actually for the newish raid browser for groups that other players are hosting manually, rather than the automatic LFR system.

The LFG files in framexml are incredibly confusing.
  Reply With Quote
04-16-20, 06:40 AM   #7
spanky0312
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 11
I know this is old post, but where do I find the LFR ID's.

Like Hellfire is 982, 9832, 9843, 985 and 986.
But I have no idea where to get this.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Dungeon IDs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off