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

BoostStats() public method

public BoostStats ( GuildMember member, char statId ) : void
member GuildMember
statId char
return void
        public void BoostStats(GuildMember member, char statId)
        {
            if (!member.HasRight(GuildRightEnum.MANAGE_BOOST))
            {
                member.SendHasNotEnoughRights();
                return;
            }

            if (BoostPoint < 1)
            {
                member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("You don't have any boost point."));
                return;
            }

            switch (statId)
            {
                case 'o':
                    if (Statistics.BaseStatistics.GetTotal(EffectEnum.AddPods) >= 5000)
                    {
                        member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Your taxcollector has already reached the max Pods."));
                        return;
                    }

                    Statistics.BaseStatistics.AddBase(EffectEnum.AddPods, 20);
                    BoostPoint--;
                    break;

                case 'x':
                    if (Statistics.BaseStatistics.GetTotal(EffectEnum.AddWisdom) >= 400)
                    {
                        member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Your taxcollector has already reached the max Wisdom."));
                        return;
                    }

                    Statistics.BaseStatistics.AddBase(EffectEnum.AddWisdom, 1);
                    BoostPoint--;
                    break;

                case 'p':
                    if (Statistics.BaseStatistics.GetTotal(EffectEnum.AddProspection) >= 500)
                    {
                        member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Your taxcollector has already reached the max Prospection."));
                        return;
                    }

                    Statistics.BaseStatistics.AddBase(EffectEnum.AddProspection, 1);
                    BoostPoint--;
                    break;

                case 'k':
                    if (BoostPoint < 10)
                    {
                        member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("You don't have enough boost point."));
                        return;
                    }
                    if (Statistics.MaxTaxcollector >= 50)
                    {
                        member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Your guild has already reached the maximum Taxcollector count."));
                        return;
                    }

                    Statistics.MaxTaxcollector++;
                    BoostPoint -= 10;
                    break;

                default:
                    member.Dispatch(WorldMessage.SERVER_ERROR_MESSAGE("Unknow boost statId"));
                    return;
            }

            SendBoostInformations(member);
        }