I am trying to create a function that returns True if the player can invite a player to a group or raid but false any other time.
I was able to come up with something but there has to be a way to simplify it.. can anyone give me suggestions?
Code:
function CanInvite()
if(GetNumRaidMembers() > 0 and IsRaidLeader()) then
return True;
elseif(GetNumPartyMembers() > 0 and IsPartyLeader()) then
return True;
elseif(GetNumPartyMembers() == 0 and GetNumRaidMembers() == 0) then
return True;
else
return False;
end
end