Hi all,
I am trying to create a social alert in chat ( a friend of mine asked for it ).
The code (very buggy indeed
is for now something like:
Lua Code:
local gmChatSocAlert = CreateFrame("Frame")
-- [... other code ...]
local function SocialAlert(enable)
if enable then
print("Social Alert ENABLED")
gmChatSocAlert:RegisterEvent("SOCIAL_QUEUE_UPDATE")
gmChatSocAlert:SetScript("OnEvent", function(self, event, arg1, arg2)
if event == "SOCIAL_QUEUE_UPDATE" then
if arg2 and arg2 >= 1 then
local className, classId, raceName, raceId, gender, name, realm = GetPlayerInfoByGUID(select(7,C_SocialQueue.GetGroupInfo(arg1)))
print(name .." create a group")
end
end
end)
else
print("Social Alert DISABLED")
gmChatSocAlert:UnregisterEvent("SOCIAL_QUEUE_UPDATE")
end
end
The problem is that I have the groupid as arg1 (for example Party-1316-00004435906E) but I was unable to use it for get group informations like description ...
I have checked but I really don't find where and how to use it to get the missing infos.
Thanks for any info/tips and help.