Codebreak.Service.World.Game.Guild.GuildInstance.BoostSpell C# (CSharp) Method

BoostSpell() public method

public BoostSpell ( GuildMember member, int spellId ) : void
member GuildMember
spellId int
return void
        public void BoostSpell(GuildMember member, int spellId)
        {
            if (!member.HasRight(GuildRightEnum.MANAGE_BOOST))
            {
                member.SendHasNotEnoughRights();
                return;
            }

            if (!Statistics.Spells.HasSpell(spellId))
            {
                member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Unknow spellId"));
                return;
            }

            if (BoostPoint < 5)
            {
                member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Not enough point to boost this spell."));
                return;
            }

            BoostPoint -= 5;
            Statistics.Spells.LevelUpSpell(spellId);
            SendBoostInformations(member);
        }