Esempio n. 1
0
        /// <summary>
        /// Removes a player from the raid.
        /// </summary>
        /// <param name="player">Player to remove.</param>
        /// <returns>RaidRemove with raid group and list of invited users.</returns>
        public override RaidRemoveResult RemovePlayer(SocketGuildUser player)
        {
            RaidRemoveResult returnValue = new RaidRemoveResult(Global.NOT_IN_RAID, new List <SocketGuildUser>());

            int groupNum = IsInRaid(player);

            if (groupNum == InviteListNumber)
            {
                Invite.Remove(player);
            }
            else if (groupNum == MuleGroupNumber)
            {
                Mules.RemovePlayer(player);
                foreach (RaidGroup group in Groups)
                {
                    returnValue.Users.AddRange(group.RemovePlayer(player));
                }
                foreach (SocketGuildUser invite in returnValue.Users)
                {
                    Invite.Add(invite);
                }
                return(returnValue);
            }
            else if (groupNum != Global.NOT_IN_RAID)
            {
                RaidGroup foundGroup = Groups.ElementAt(groupNum);
                foundGroup.RemovePlayer(player);
            }
            return(returnValue);
        }
Esempio n. 2
0
        /// <summary>
        /// Removes a player from the raid.
        /// </summary>
        /// <param name="player">Player to remove.</param>
        /// <returns>RaidRemove with raid group and list of invited users.</returns>
        public override RaidRemoveResult RemovePlayer(SocketGuildUser player)
        {
            RaidRemoveResult returnValue = new RaidRemoveResult(Global.NOT_IN_RAID, new List <SocketGuildUser>());

            int group = IsInRaid(player);

            if (group == InviteListNumber)
            {
                Invite.Remove(player);
            }
            else
            {
                if (group != Global.NOT_IN_RAID)
                {
                    RaidGroup foundGroup            = Groups.ElementAt(group);
                    List <SocketGuildUser> tempList = foundGroup.RemovePlayer(player);
                    foreach (SocketGuildUser invite in tempList)
                    {
                        returnValue.Users.Add(invite);
                        Invite.Add(invite);
                    }
                }
            }
            return(returnValue);
        }