View Single Post
02/09/23, 03:05 PM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,011
You always should read the API documentation txt file for the parameters and parameter TYPES used! unitTags are not the same as character names or displaynames!

Afaik IsUnitInCombat(unitTag) only accepts unittags like "player" (yourself), "group1" to "groupN", "boss1" to "bossN" or "reticleover" and not any charactername or displayname!
So you cannot test IsUnitInCombat for any name on the server, only for yourself or grouped players.
There exist API group functions to check what name the group1, group2 etc. tags have but I'm not sure anymore, you need to search the API documentation txt file for them

I think it was a loop over group members by
Code:
for i=1, GetGroupSize() do
  local unitTag = GetGroupUnitTag(i)
end
or something similar.
  Reply With Quote