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 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 |
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. |
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
|
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:
|
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. |
Quote:
The LFG files in framexml are incredibly confusing. |
Quote:
The LFGRewardsFrameEncounterList_OnEnter() is populating the tooltip I was thinking of - not anything new then what is already in the thread, sorry. |
Semlar, I'll look into that some more but the error in my macro results just make me more confused with what you put, I figure out they were in a wrong order of some sort, but the boss names all printed correctly with the way I had it, just the completion status for two of the bosses was wrong, I'll do more tests on what you put and what I put though
|
Here's a small bit of code to show the basics of what you need:
Lua Code:
And here is semlar's macro shrunk some for those that prefer macros in preparation for 4-digit dungeon IDs: Lua Code:
|
Vrul, that last macro you posted does exactly what my guildy wanted! Thanks! I hate to bother you again, but I want to add color to the completed and not completed lines.
I have this macro: Code:
/run for i=1,GetNumSavedInstances() do local n,_,_,d,l = GetSavedInstanceInfo(i) if d==23 then print(n,l and "Completed" or "\124cffff0000Not Completed") end end |
Macros have a character limit of 255.
The one I posted is exactly 255 characters long; Vrul rewrote it to be 234 characters which leaves you with 21 characters which is just barely enough to color one of the strings. You asked why your macro wasn't working but didn't post it, so we have no way to know what's wrong with it, but odds are you exceeded the character limit. This will color it but is presumably what you already have. Lua Code:
For anything more complex you'll either need to run an addon that lets you write extended macros, or turn this into an addon. |
See things like the character limit, I would never have thought of.
The macro you posted colors the "Not completed", but not the "completed" The original macro is: Code:
/run for i=1,GetNumSavedInstances() do local n,_,_,d,l = GetSavedInstanceInfo(i) if d==23 then print(n,l and "\124cff00ff00Completed" or "\124cffff0000Not Completed") end end |
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. |
All times are GMT -6. The time now is 08:44 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI