Exemple #1
0
        public static Obj_AI_Hero Target()
        {
            var         priorty = 5;
            Obj_AI_Hero target  = null;

            if (selectedTarget != null && selectedTarget.IsValidTarget(Menu.Item("STR").GetValue <Slider>().Value))
            {
                return(selectedTarget);
            }
            if (Menu.Item("Selected Mode").GetValue <StringList>().SelectedIndex == 8)
            {
                foreach (
                    var enemy in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(a => !a.IsAlly && a.IsValidTarget(TargetSelector.GetRange()))
                    .OrderBy(a => a.Health))
                {
                    if (Menu.Item(enemy.ChampionName).GetValue <Slider>().Value < priorty)
                    {
                        priorty = Menu.Item(enemy.ChampionName).GetValue <Slider>().Value;
                        target  = enemy;
                    }
                }
            }
            else
            {
                target = TargetSelector.Target;
            }
            return(target);
        }