Beispiel #1
0
        /// <summary>
        /// Removes a player if their party size is zero.
        /// Any players invited by them are moved back to requesting invite.
        /// </summary>
        /// <param name="player">Player to remove.</param>
        /// <returns>Return a dictionary of all users invited by the player.</returns>
        public Dictionary <SocketGuildUser, List <SocketGuildUser> > ClearEmptyPlayer(SocketGuildUser player)
        {
            int group = IsInRaid(player, false);

            if (group != Global.NOT_IN_RAID)
            {
                Dictionary <SocketGuildUser, List <SocketGuildUser> > empty = Groups.ElementAt(group).ClearEmptyPlayers();
                foreach (KeyValuePair <SocketGuildUser, List <SocketGuildUser> > user in empty)
                {
                    Invite.AddRange(user.Value);
                }
                return(empty);
            }
            return(new Dictionary <SocketGuildUser, List <SocketGuildUser> >());
        }