Пример #1
0
        /// <summary>
        /// returns The build name.
        /// </summary>
        ///

        public static string BuildName()
        {
            var ChampionName = Player.Instance.CleanChampionName();

            if (ADC.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("ADC");
            }

            if (AD.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("AD");
            }

            if (AP.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("AP");
            }

            if (ManaAP.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("ManaAP");
            }

            if (Tank.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("Tank");
            }

            Logger.Send("Failed to detect champion: " + ChampionName, Logger.LogLevel.Warn);
            //Logger.Send("Using Default Build !");
            return("Default");
        }
Пример #2
0
        /// <summary>
        /// returns The build name.
        /// </summary>
        public static string BuildName()
        {
            var ChampionName = CleanUpChampionName(Player.Instance.ChampionName);

            if (ChampionName.Equals("MonkeyKing", StringComparison.CurrentCultureIgnoreCase))
            {
                ChampionName = "Wukong";
            }

            if (ADC.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("ADC");
            }

            if (AD.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("AD");
            }

            if (AP.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("AP");
            }

            if (ManaAP.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("ManaAP");
            }

            if (Tank.Any(s => s.Equals(ChampionName, StringComparison.CurrentCultureIgnoreCase)))
            {
                return("Tank");
            }

            Logger.Send("Failed To Detect " + ChampionName, Logger.LogLevel.Warn);
            //Logger.Send("Using Default Build !");
            return("Default");
        }