Thekinghim / keystone-companion

3 stars 4 forks source link

display best dungeons for the current tyrannical/fortified week #27

Closed kaelonR closed 4 months ago

kaelonR commented 4 months ago

Split from #18:

Also, it would be cool if holding alt or some other mod keybind would display best dungeons for the current tyrannical/fortified week in this tooltip

https://imgur.com/a/TdkreBi

Not sure if that's possible but it would help in making decisions for what key to go to next.

Larsj02 commented 4 months ago

Sure is possible and shouldn't be hard https://warcraft.wiki.gg/wiki/API_C_MythicPlus.GetWeeklyBestForMap

Larsj02 commented 4 months ago
local maps = C_ChallengeMode.GetMapTable()
for _, mapID in ipairs(maps) do
   local duration, level = C_MythicPlus.GetWeeklyBestForMap(mapID)
   if duration then
      local name = C_ChallengeMode.GetMapUIInfo(mapID)
      print(string.format("+%d %s in %s", level, name, SecondsToTime(duration)))
   end
end

image