GetNumParty/GetNumRaidMembers Removed - What Now?

90 Night Elf Druid
9755
I used to use GetNumPartyMembers and GetNumRaidMembers to determine whether or not a player was in a party or raid. But now that they've been replaced with GetNumSubgroupMembers, I suddenly find myself unable to do this.

Time was I could do this:


local inRaid = GetNumRaidMembers() >= 1
local inParty = GetNumPartyMembers() >= 1

if (inRaid) then
-- Do something.
elseif (inParty) then
-- Do something else.
end


But now that I have to use GetNumSubgroupMembers, my addon is suddenly refusing to work in a party, by constantly complaining that I'm not in a raid.

I guess what I'm trying to ask is - how do I use GetNumSubgroupMembers to determine whether a player is in a party or a raid?

And to be honest, I don't see why GetNumParty/RaidMembers was removed to begin with.
Reply Quote
92 Dwarf Hunter
18135
try that way

if IsInRaid() then
-- Do something.
elseif GetNumGroupMembers() ~= 0 then
-- Do something else.
end
Edited by Mazzop on 31/08/2012 18:17 BST
Reply Quote
or try
local inRaid = UnitInRaid("player");
local inParty = UnitInParty("player");
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]