Beispiel #1
0
        public static string Age(List <string> strings)
        {
            if (CampaignCheats.CheckParameters(strings, 0) || CampaignCheats.CheckHelp(strings))
            {
                return($"{FormatMsgHeader.ToString()} \"dcc.age [{AgeText.ToString()}]\".");
            }
            int num = 1;

            if (!int.TryParse(strings[0], out num))
            {
                return(EnterAgeMsg.ToString());
            }
            Hero.MainHero.BirthDay = HeroHelper.GetRandomBirthDayForAge((float)num);
            return(SuccessMsg.ToString());
        }
Beispiel #2
0
        public static string AgeHero(List <string> strings)
        {
            if (!CampaignCheats.CheckParameters(strings, 2) || CampaignCheats.CheckHelp(strings))
            {
                return($"{FormatMsgHeader.ToString()} \"dcc.age_hero [{HeroNameText.ToString()}] [{AgeText.ToString()}]\".");
            }
            Hero hero = CampaignCheats.GetHero(strings[0].Replace('_', ' '));

            if (hero == null)
            {
                return(HeroNotFoundMsg.ToString());
            }
            if (!int.TryParse(strings[1], out int num))
            {
                return(EnterAgeMsg.ToString());
            }
            hero.BirthDay = HeroHelper.GetRandomBirthDayForAge(num);
            return(SuccessMsg.ToString());
        }