Add highest mythic +'s keys completed for the week
chancedj opened this issue ยท 3 comments
- Request keystone info
C_ChallengeMode.RequestMapInfo()
- Store keystone info by map
MythicMaps = C_ChallengeMode.GetMapTable()
- Iterate map info to find the highest level that was completed this week
local bestlevel = 0
for i = 1, #MythicMaps do
local _, _, level = C_ChallengeMode.GetMapPlayerStats(MythicMaps[i]);
-- 1 lastCompletionMilliseconds number
-- 2 bestCompletionMilliseconds number
-- 3 bestLevel number
-- 4 affixIDs number[]
-- 5 bestLevelYear number
-- 6 bestLevelMonth number
-- 7 bestLevelDay number
-- 8 bestLevelHour number
-- 9 bestLevelMinute number
-- 10 bestSpecIDs1 number
-- + (bestSpecIDs2), ...
if level then
-- print("Level", level)
if level > bestlevel then
bestlevel = level
end
end
end
This is based on what SavedInstances does; a simple return bestlevel
will give the highest completed keystone for the week. You can probably use GetMapInfo to map those results to each dungeon.
thanks. i'm using the encounter journal (EncounterInfo variable) to use this as the id returned back should be the encounterId - at least it is from the keystone that's in the bag :). appreciate the code and head start.