LockedOut

LockedOut

104k Downloads

Add highest mythic +'s keys completed for the week

chancedj opened this issue ยท 3 comments

commented

for each instance add the highest keystone completed (if you've done so).

commented
  1. Request keystone info
    C_ChallengeMode.RequestMapInfo()
  2. Store keystone info by map
    MythicMaps = C_ChallengeMode.GetMapTable()
  3. 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 bestlevelwill give the highest completed keystone for the week. You can probably use GetMapInfo to map those results to each dungeon.

commented

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.

commented

complete! currently in the 1.8 branch.