private static void SmiteEvent(EventArgs args)
        {
            Smiter.SetSmiteSlot();
            if (!Smite.IsReady() || Player.Instance.IsDead)
            {
                return;
            }
            if (_smiteMenu["smiteActive"].Cast <KeyBind>().CurrentValue)
            {
                var unit =
                    EntityManager.MinionsAndMonsters.Monsters
                    .Where(
                        a =>
                        Smiter.SmiteableUnits.Contains(a.BaseSkinName) && a.Health < Smiter.GetSmiteDamage() &&
                        _smiteMenu[a.BaseSkinName].Cast <CheckBox>().CurrentValue)
                    .OrderByDescending(a => a.MaxHealth)
                    .FirstOrDefault();

                if (unit != null)
                {
                    Smite.Cast(unit);
                    return;
                }
            }
            if (_smiteMenu["useSlowSmite"].Cast <CheckBox>().CurrentValue&&
                Smite.Handle.Name == "s5_summonersmiteplayerganker")
            {
                foreach (
                    var target in
                    EntityManager.Heroes.Enemies
                    .Where(h => h.IsValidTarget(Smite.Range) && h.Health <= 20 + 8 * Player.Instance.Level))
                {
                    Smite.Cast(target);
                    return;
                }
            }
            if (_smiteMenu["comboWithDuelSmite"].Cast <CheckBox>().CurrentValue&&
                Smite.Handle.Name == "s5_summonersmiteduel" &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                foreach (
                    var target in
                    EntityManager.Heroes.Enemies
                    .Where(h => h.IsValidTarget(Smite.Range)).OrderByDescending(TargetSelector.GetPriority))
                {
                    Smite.Cast(target);
                    return;
                }
            }
        }
示例#2
0
        private static void SmiteEvent(EventArgs args)
        {
            if (_smiteMenu["smiteActive"].Cast <KeyBind>().CurrentValue)
            {
                Smiter.SetSmiteSlot();
                var unit =
                    ObjectManager.Get <Obj_AI_Base>()
                    .Where(
                        a =>
                        Smiter.SmiteableUnits.Contains(a.BaseSkinName) && a.Health < Smiter.GetSmiteDamage() &&
                        _smiteMenu[a.BaseSkinName].Cast <CheckBox>().CurrentValue)
                    .OrderByDescending(a => a.MaxHealth)
                    .FirstOrDefault();

                if (unit != null)
                {
                    Smite.Cast(unit);
                    return;
                }
            }
            if (_smiteMenu["useSlowSmite"].Cast <CheckBox>().CurrentValue&&
                Smite.Handle.Name == "s5_summonersmiteplayerganker")
            {
                foreach (
                    var target in
                    ObjectManager.Get <AIHeroClient>()
                    .Where(h => h.IsEnemy && h.IsValidTarget(Smite.Range) && h.Health <= 20 + 8 * _Player.Level))
                {
                    Smite.Cast(target);
                    Chat.Print("Smited son");
                    return;
                }
            }
            if (_smiteMenu["comboWithDuelSmite"].Cast <CheckBox>().CurrentValue&&
                Smite.Handle.Name == "s5_summonersmiteduel" &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                foreach (
                    var target in
                    ObjectManager.Get <AIHeroClient>()
                    .Where(h => h.IsValidTarget(Smite.Range)).OrderBy(a => a.Distance(_Player)))
                {
                    Smite.Cast(target);
                    return;
                }
            }
        }