Example #1
0
        /// <summary>
        /// Event callback which fired when targeted spell is detected
        /// </summary>
        /// <param name="args">The args.</param>
        private void TargetedSpellDetector_OnDetected(DetectedTargetedSpellArgs args)
        {
            if (IsEnabled)
            {
                if (OnlyDangerous && !args.SpellData.IsDangerous)
                    return;

                if (m_fnEvade != null && m_Menu.Item("SCommon.TargetedSpellEvader.Spell." + args.SpellData.SpellName).GetValue<bool>())
                    m_fnEvade(args);
            }
        }
        /// <summary>
        /// Event callback which fired when targeted spell is detected
        /// </summary>
        /// <param name="args">The args.</param>
        private void TargetedSpellDetector_OnDetected(DetectedTargetedSpellArgs args)
        {
            if (IsEnabled)
            {
                if (OnlyDangerous && !args.SpellData.IsDangerous)
                {
                    return;
                }

                if (m_fnEvade != null && m_Menu.Item("SCommon.TargetedSpellEvader.Spell." + args.SpellData.SpellName).GetValue <bool>())
                {
                    m_fnEvade(args);
                }
            }
        }
Example #3
0
        /// <summary>
        /// Event callback which fired when targeted spell is detected
        /// </summary>
        /// <param name="args">The args.</param>
        private void TargetedSpellDetector_OnDetected(DetectedTargetedSpellArgs args)
        {
            if (IsEnabled)
            {
                if (OnlyDangerous && !args.SpellData.IsDangerous)
                {
                    return;
                }

                if (m_fnEvade != null && getCheckBoxItem("SCommon.TargetedSpellEvader.Spell." + args.SpellData.SpellName))
                {
                    m_fnEvade(args);
                }
            }
        }
Example #4
0
 private void TargetedSpell_Evade(DetectedTargetedSpellArgs args)
 {
     if (Spells[Q].IsReady())
     {
         if (Orbwalker.ActiveMode != SCommon.Orbwalking.Orbwalker.Mode.Combo || !m_targetedEvader.DisableInComboMode)
         {
             if (args.Caster.IsValidTarget(Spells[Q].Range))
                 Spells[Q].CastOnUnit(args.Caster);
             else
             {
                 var hero = HeroManager.Enemies.Where(p => p.IsValidTarget(Spells[Q].Range)).OrderBy(q => ObjectManager.Player.Distance(q.ServerPosition)).FirstOrDefault();
                 if (hero != null)
                     Spells[Q].CastOnUnit(hero);
                 else
                 {
                     var minion = MinionManager.GetMinions(Spells[Q].Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.None).OrderBy(p => ObjectManager.Player.ServerPosition.Distance(p.ServerPosition)).FirstOrDefault();
                     if (minion != null)
                         Spells[Q].CastOnUnit(minion);
                 }
             }
         }
     }
 }
Example #5
0
 protected virtual void TargetedSpellDetector_OnDetected(DetectedTargetedSpellArgs data)
 {
     //
 }
Example #6
0
 private void TargetedSpell_Evade(DetectedTargetedSpellArgs data)
 {
     if (Spells[E].IsReady() && Helpers.BallMgr.IsBallReady)
     {
         if (Orbwalker.ActiveMode != SCommon.Orbwalking.Orbwalker.Mode.Combo || !m_targetedEvader.DisableInComboMode)
             Spells[E].CastOnUnit(ObjectManager.Player);
     }
 }
Example #7
0
 private void TargetedSpell_Evade(DetectedTargetedSpellArgs data)
 {
     if (Spells[E].IsReady())
     {
         if (Orbwalker.ActiveMode != SCommon.Orbwalking.Orbwalker.Mode.Combo || !m_targetedEvader.DisableInComboMode)
         {
             var pos = Vector2.Zero;
             if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Combo && Orbwalker.GetTarget().NetworkId == data.Caster.NetworkId)
             {
                 if (data.Caster.ServerPosition.CountEnemiesInRange(1000) <= 1 || !data.SpellData.IsDangerous)
                     pos = Orbwalker.GetTarget().Position.To2D();
                 else if (data.SpellData.IsDangerous)
                     pos = SCommon.Maths.Geometry.Deviation(ObjectManager.Player.ServerPosition.To2D(), data.Caster.ServerPosition.To2D(), 90);
                 else
                     pos = ObjectManager.Player.ServerPosition.Extend(data.Caster.ServerPosition, -400).To2D();
             }
             else
             {
                 if (data.SpellData.IsDangerous)
                     pos = ObjectManager.Player.ServerPosition.Extend(data.Caster.ServerPosition, -400).To2D();
                 else
                     pos = SCommon.Maths.Geometry.Deviation(ObjectManager.Player.ServerPosition.To2D(), data.Caster.ServerPosition.To2D(), 90);
             }
             if (pos.IsValid())
                 Spells[E].Cast(pos);
         }                
     }
 }
Example #8
0
        /// <summary>
        ///     Event callback which fired when targeted spell is detected
        /// </summary>
        /// <param name="args">The args.</param>
        private void TargetedSpellDetector_OnDetected(DetectedTargetedSpellArgs args)
        {
            if (IsEnabled)
            {
                if (OnlyDangerous && !args.SpellData.IsDangerous)
                    return;

                if (m_fnEvade != null &&
                    getCheckBoxItem("SCommon.TargetedSpellEvader.Spell." + args.SpellData.SpellName))
                    m_fnEvade(args);
            }
        }