コード例 #1
0
        public void ChangeParameters(GuildMemberInstance source, uint rights, ushort rank, sbyte xpPercent)
        {
            if (source.IsBoss && rank == 1)
            {
                this.Guild.SetBoss(this);
            }
            else if (source == this || !this.IsBoss)
            {
                if (source.HasRight(GuildRightsBitEnum.GUILD_RIGHT_MANAGE_RANKS) && rank >= 0 && rank <= 35)
                {
                    this.Record.Rank = rank;
                }
                if (source.HasRight(GuildRightsBitEnum.GUILD_RIGHT_MANAGE_RIGHTS))
                {
                    this.Record.Rights = rights;
                }
            }
            if (source.HasRight(GuildRightsBitEnum.GUILD_RIGHT_MANAGE_XP_CONTRIBUTION) || (source == this && source.HasRight(GuildRightsBitEnum.GUILD_RIGHT_MANAGE_MY_XP_CONTRIBUTION)))
            {
                this.Record.experienceGivenPercent = (sbyte)((xpPercent < 90) ? xpPercent : 90);
            }
            this.Guild.Record.UpdateElement();
            this.Update();

            if (this.Connected)
            {
                this.Character.SendGuildMembership();
            }
        }