Tercioo / Open-Raid-Library

Library for World of Warcraft game, help to transmit data among players in a group
GNU Lesser General Public License v2.1
7 stars 15 forks source link

KeystoneUpdate event callback missing unitName data #54

Open jcorrington opened 8 months ago

jcorrington commented 8 months ago

When using the call back function for an "KeystoneUpdate" event as shown in the docs.txt file. The unitName parameter seems to be always nil.

function MyAddonObject.OnKeystoneUpdate(unitName, keystoneInfo, allKeystoneInfo)
    local mapName = C_ChallengeMode.GetMapUIInfo(keystoneInfo.mythicPlusMapID)
    print(unitName .. " has a " .. keystoneInfo.level .. " keystone for map " .. mapName  .. ".")
end

--registering the callback:
openRaidLib.RegisterCallback(MyAddonObject, "KeystoneUpdate", "OnKeystoneUpdate")

As far as I could tell with some testing the first parameter was always keystoneInfo, which doesn't contain any name information of WHOSE data it is. Combing through allKeystoneInfo is also to much when only interested in party data.

Am I missing something with the unitName parameter?