GetNumParty/GetNumRaidMembers Removed - What Now?

Interface and Macros
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.

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.
try that way

if IsInRaid() then
-- Do something.
elseif GetNumGroupMembers() ~= 0 then
-- Do something else.
or try
local inRaid = UnitInRaid("player");
local inParty = UnitInParty("player");

Join the Conversation

Return to Forum