Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-05-19, 03:45 AM   #1
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
C_MythicPlus.GetOwnedKeystoneChallengeMapID() and other strange things :)

Hi all,

I am doing a little ldb for m+ keystone tracker using standard databroker and LibQTip.



One of the problem I am facing is that the:

Lua Code:
  1. C_MythicPlus.GetOwnedKeystoneChallengeMapID()

seems not available at the PLAYER_ENTERING_WORLD event.

But I am unable to find what I have to load or wait to have this value.
Infact after a while I got it. Mah.

Another problem really strange is that a character usually get the data of the previous one logged before in the:
Lua Code:
  1. C_MythicPlus.GetWeeklyBestForMap(mapID)

I check similar addons and all seems to have this kind of problem, is it a known bug ?
I.e IKeyStones use this code to bypass:

Lua Code:
  1. function iKS:scanCharacterMaps()
  2.     if not iKS:createPlayer() then return end
  3.     local maps = C_ChallengeMode.GetMapTable()
  4.     local maxCompleted = 0
  5.     for _, mapID in pairs(maps) do
  6.         local _, level, _, affixes, members = C_MythicPlus.GetWeeklyBestForMap(mapID)
  7.         if members then
  8.             for _,member in pairs(members) do -- Avoid leaking from another char (wtf??, how is this even possible)
  9.                 if member.name == unitName then
  10.                     if level and level > maxCompleted then
  11.                         maxCompleted = level
  12.                     end
  13.                     break;
  14.                 end
  15.             end
  16.         end
  17.     end
  18.     if iKeystonesDB[player].maxCompleted and iKeystonesDB[player].maxCompleted < maxCompleted then
  19.         iKeystonesDB[player].maxCompleted = maxCompleted
  20.     end
  21. end

Thanks so much for any tips.


P.s.
Also this seems to me strange and odd:

__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.

Last edited by gmarco : 05-05-19 at 03:48 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » C_MythicPlus.GetOwnedKeystoneChallengeMapID() and other strange things :)


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