/// <summary> /// Accepts an invite of a player. /// </summary> /// <param name="requester">Player that requested the invite.</param> /// <param name="accepter">Player that accepted the invite.</param> /// <returns>True if the requester was invited, otherwise false.</returns> public override bool InvitePlayer(SocketGuildUser requester, SocketGuildUser accepter) { if (Invite.Contains(requester) && Mules.HasPlayer(accepter, false)) { return(AddPlayer(requester, 1, accepter)); } return(false); }
/// <summary> /// Checks if a player is in the raid. /// This does not check the raid request invite list. /// </summary> /// <param name="player">Player to check.</param> /// <param name="checkInvite">If invited players should be checked.</param> /// <returns>Group number the player is in, else NotInRaid.</returns> public override int IsInRaid(SocketGuildUser player, bool checkInvite = true) { if (checkInvite && Invite.Contains(player)) { return(InviteListNumber); } for (int i = 0; i < Groups.Count; i++) { if (Groups.ElementAt(i).HasPlayer(player, checkInvite)) { return(i); } } return(Global.NOT_IN_RAID); }