View Single Post
11/26/15, 03:01 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,009
I had the same problem which couldn't be solved in the past.
So I wrote a workaround at player activated event callback function, which get's the actual group size and checks if I'm in the group member table:


Lua Code:
  1. -- Get group Size
  2.     local groupSize = GetGroupSize()
  3.     if groupSize <= 1 then
  4.         d(">> You are not in a group")
  5.         return
  6.     end
  7.  
  8.     local charName
  9.     local playerName = GetUnitName("player")
  10.     -- Cycle through group and check their "unitTags"
  11.     for i=1, groupSize, 1 do
  12.         charName = GetUnitName(GetGroupUnitTagByIndex(i))
  13.         if charName == playerName then
  14.             d("You are in a group!")
  15.                 return -- break here
  16.         end
  17.     end

Edit:
Oh and for all other situations the callback function for event EVENT_GROUP_MEMBER_JOINED used the same check, and it fired correctly for me (couldn't test it in the past days though!)

Last edited by Baertram : 11/26/15 at 03:04 AM.
  Reply With Quote