Exemple #1
0
        private static IEnumerable <Targets.Item> GetOrderedChampions(List <Targets.Item> items)
        {
            switch (Mode)
            {
            case ModeType.Weights:
                return(Weights.OrderChampions(items));

            case ModeType.Priorities:
                return(Priorities.OrderChampions(items));

            case ModeType.LessAttacksToKill:
                return(items.OrderBy(x => x.Hero.Health / ObjectManager.Player.TotalAttackDamage));

            case ModeType.MostAbilityPower:
                return(items.OrderByDescending(x => x.Hero.TotalMagicalDamage));

            case ModeType.MostAttackDamage:
                return(items.OrderByDescending(x => x.Hero.TotalAttackDamage));

            case ModeType.Closest:
                return(items.OrderBy(x => x.Hero.Distance(ObjectManager.Player)));

            case ModeType.NearMouse:
                return(items.OrderBy(x => x.Hero.Distance(Game.CursorPos)));

            case ModeType.LessCastPriority:
                return(items.OrderBy(x => x.Hero.Health / ObjectManager.Player.TotalMagicalDamage));

            case ModeType.LeastHealth:
                return(items.OrderBy(x => x.Hero.Health));
            }
            return(new List <Targets.Item>());
        }
Exemple #2
0
        public static void AddToMenu(Menu menu)
        {
            menu.Name = "sfx.ts";
            Menu      = menu;

            Drawings.AddToMainMenu();
            Weights.AddToMainMenu();
            Priorities.AddToMainMenu();
            Selected.Focus.AddToMainMenu();
            Humanizer.AddToMainMenu();
            Modes.AddToMainMenu();
        }
Exemple #3
0
        public static void AddToMenu(Menu menu)
        {
            _menu = menu.AddSubMenu(new Menu("Target Selector", "sfx.ts"));

            var drawingMenu = _menu.AddSubMenu(new Menu("Drawings", _menu.Name + ".drawing"));

            drawingMenu.AddItem(
                new MenuItem(drawingMenu.Name + ".circle-thickness", "Circle Thickness").SetShared()
                .SetValue(new Slider(5, 1, 10)));

            Selected.AddToMenu(_menu, drawingMenu);
            Weights.AddToMenu(_menu, drawingMenu);
            Priorities.AddToMenu(_menu);

            _menu.AddItem(new MenuItem(_menu.Name + ".focus", "Focus Selected Target").SetShared().SetValue(true));
            _menu.AddItem(
                new MenuItem(_menu.Name + ".force-focus", "Only Attack Selected Target").SetShared().SetValue(false));
            _menu.AddItem(
                new MenuItem(_menu.Name + ".force-focus-weight", "Only Attack Highest Weight Target").SetShared()
                .SetValue(false));

            Humanizer.AddToMenu(_menu);

            _menu.AddItem(
                new MenuItem(_menu.Name + ".mode", "Mode").SetShared()
                .SetValue(
                    new StringList(
                        new[]
            {
                "Weigths", "Priorities", "Less Attacks To Kill", "Most Ability Power",
                "Most Attack Damage", "Closest", "Near Mouse", "Less Cast Priority", "Least Health"
            })))
            .ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs args)
            {
                Mode = GetModeBySelectedIndex(args.GetNewValue <StringList>().SelectedIndex);
            };

            Mode = GetModeBySelectedIndex(_menu.Item(_menu.Name + ".mode").GetValue <StringList>().SelectedIndex);
            LeagueSharp.Common.TargetSelector.CustomTS = true;
        }
 public static float GetPriority(Obj_AI_Hero hero)
 {
     return(Priorities.GetPriority(hero));
 }
 public static void SetPriority(Obj_AI_Hero hero, int newPriority)
 {
     Priorities.SetPriority(hero, newPriority);
 }
Exemple #6
0
 public static float GetPriority(AIHeroClient hero)
 {
     return(Priorities.GetPriority(hero));
 }
Exemple #7
0
 public static void SetPriority(AIHeroClient hero, int newPriority)
 {
     Priorities.SetPriority(hero, newPriority);
 }