Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-15-16, 12:37 AM   #1
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Is "UnitIsInMyGuild" a broken function?

It seems like "UnitIsInMyGuild" only checks for those players in your guild with the same realm.
It returns "false" whether you check their realm or not.

For example, your name is AAA-BBB, one of your guild members named CCC-DDD.
Both UnitIsInMyGuild("CCC") and UnitIsInMyGuild("CCC-DDD") would return false.

UnitInRaid and UnitInParty won't support realm info either.
Your name is AAA-BBB, your party member is CCC-DDD.
Both UnitInRaid("CCC") and UnitInRaid("CCC-DDD") return true.

The following code is what I am currently using to check my members.
Code:
local UnitInGuild = function(unit)
	for i = 1, GetNumGuildMembers() do
		local name = GetGuildRosterInfo(i)
		if name and name == unit then
			return true
		end
	end
	return false
end

Last edited by siweia : 07-15-16 at 12:39 AM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Is "UnitIsInMyGuild" a broken function?


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