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

                if (unit != null)
                {
                    SmiteSpell.Cast(unit);
                    return;
                }
            }
            if (SmiteMenu["useSlowSmite"].Cast <CheckBox>().CurrentValue&&
                SmiteSpell.Handle.Name == "s5_summonersmiteplayerganker")
            {
                foreach (
                    var target in
                    EntityManager.Heroes.Enemies
                    .Where(h => h.IsValidTarget(SmiteSpell.Range) && h.Health <= 20 + 8 * Player.Level))
                {
                    SmiteSpell.Cast(target);
                    return;
                }
            }
            if (SmiteMenu["comboWithDuelSmite"].Cast <CheckBox>().CurrentValue&&
                SmiteSpell.Handle.Name == "s5_summonersmiteduel" &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                foreach (
                    var target in
                    EntityManager.Heroes.Enemies
                    .Where(h => h.IsValidTarget(SmiteSpell.Range)).OrderByDescending(TargetSelector.GetPriority)
                    )
                {
                    SmiteSpell.Cast(target);
                    return;
                }
            }
        }
Beispiel #2
0
 private static void OnUpdate(EventArgs args)
 {
     // Check if summoner wants to smite
     if ((HoldKey.CurrentValue || ToggleKey.CurrentValue) && SmiteSpell.IsReady())
     {
         // Get first smiteable monster
         var smiteable =
             CurrentySmiteable.Where(o => Player.Instance.IsInRange(o, SmiteRange + Player.Instance.BoundingRadius + o.BoundingRadius)).OrderByDescending(o => o.MaxHealth).FirstOrDefault();
         if (smiteable != null)
         {
             // Check if that monster is enabled
             var name = smiteable.BaseSkinName.ToLower();
             if (EnabledMonsters.Any(enabled => name.Equals(enabled.Key.ToLower()) && enabled.Value.CurrentValue))
             {
                 // Check if monster can be killed
                 if (smiteable.TotalShieldHealth() <= SmiteDamage)
                 {
                     // Cast Smite
                     SmiteSpell.Cast(smiteable);
                 }
             }
         }
     }
 }