Пример #1
0
        /// <summary>
        /// The callback when called spell hit detected
        /// </summary>
        /// <param name="direction">The skillshot direction.</param>
        /// <param name="target">The target.</param>
        public void OnSpellHitDetected(Vector2 direction, Obj_AI_Base target)
        {
            EvadeData edata;

            Vector2 evade_direction = direction.Perpendicular();
            Vector2 evade_pos       = ObjectManager.Player.ServerPosition.To2D() + evade_direction * EvadeSpell.Range;

            bool position_needed = SpecialMethod.HasFlag(EvadeMethods.Dash) || SpecialMethod.HasFlag(EvadeMethods.Blink);

            if (position_needed)
            {
                switch (evade.Item("EVADEMETHOD").GetValue <StringList>().SelectedIndex)
                {
                case 0:     //near turret
                    CorrectNearTurret(ref evade_pos, evade_direction);
                    break;

                case 1:     //less enemies
                    CorrectLessEnemies(ref evade_pos, evade_direction);
                    break;

                case 2:     //both
                    if (!CorrectLessEnemies(ref evade_pos, evade_direction))
                    {
                        CorrectNearTurret(ref evade_pos, evade_direction);
                    }
                    break;
                }
            }

            edata = new EvadeData
                        (evade_pos,
                        ObjectManager.Player.CharData.BaseSkinName == "Morgana" || ObjectManager.Player.CharData.BaseSkinName == "Lissandra",
                        ObjectManager.Player.CharData.BaseSkinName == "Sivir" || ObjectManager.Player.CharData.BaseSkinName == "Nocturne" || ObjectManager.Player.CharData.BaseSkinName == "Vladimir",
                        target);

            m_evade_queue.Enqueue(edata);
        }
Пример #2
0
        public void OnSpellHitDetected(Vector2 direction, Obj_AI_Base target)
        {
            EvadeData edata;

            Vector2 evade_direction = direction.Perpendicular();
            Vector2 evade_pos       = ObjectManager.Player.ServerPosition.To2D() + direction.Perpendicular() * EvadeSpell.Range;

            bool position_needed = !(SpecialMethod.HasFlag(EvadeMethods.MorganaE) || SpecialMethod.HasFlag(EvadeMethods.LissandraR) || SpecialMethod.HasFlag(EvadeMethods.KayleR) || SpecialMethod.HasFlag(EvadeMethods.SivirE) || SpecialMethod.HasFlag(EvadeMethods.NocturneW) || SpecialMethod.HasFlag(EvadeMethods.VladimirW));

            if (position_needed)
            {
                switch (evade.Item("EVADEMETHOD").GetValue <StringList>().SelectedIndex)
                {
                case 0:     //near turret
                    CorrectNearTurret(ref evade_pos, evade_direction.Perpendicular());
                    break;

                case 1:     //less enemies
                    CorrectLessEnemies(ref evade_pos, evade_direction.Perpendicular());
                    break;

                case 2:     //both
                    if (!CorrectLessEnemies(ref evade_pos, evade_direction.Perpendicular()))
                    {
                        CorrectNearTurret(ref evade_pos, evade_direction.Perpendicular());
                    }
                    break;
                }
            }

            edata = new EvadeData
                        (evade_pos,
                        SpecialMethod.HasFlag(EvadeMethods.MorganaE) || SpecialMethod.HasFlag(EvadeMethods.LissandraR) || SpecialMethod.HasFlag(EvadeMethods.KayleR),
                        SpecialMethod.HasFlag(EvadeMethods.SivirE) || SpecialMethod.HasFlag(EvadeMethods.NocturneW) || SpecialMethod.HasFlag(EvadeMethods.VladimirW),
                        target);

            m_evade_queue.Enqueue(edata);
        }
Пример #3
0
        public void OnSpellHitDetected(Vector2 direction, Obj_AI_Base target)
        {
            EvadeData edata;

            Vector2 evade_direction = direction.Perpendicular();
            Vector2 evade_pos = ObjectManager.Player.ServerPosition.To2D() + direction.Perpendicular() * EvadeSpell.Range;

            bool position_needed = !(SpecialMethod.HasFlag(EvadeMethods.MorganaE) || SpecialMethod.HasFlag(EvadeMethods.LissandraR) || SpecialMethod.HasFlag(EvadeMethods.KayleR) || SpecialMethod.HasFlag(EvadeMethods.SivirE) || SpecialMethod.HasFlag(EvadeMethods.NocturneW) || SpecialMethod.HasFlag(EvadeMethods.VladimirW));

            if (position_needed)
            {
                switch (evade.Item("EVADEMETHOD").GetValue<StringList>().SelectedIndex)
                {
                    case 0: //near turret
                        CorrectNearTurret(ref evade_pos, evade_direction.Perpendicular());
                        break;

                    case 1: //less enemies
                        CorrectLessEnemies(ref evade_pos, evade_direction.Perpendicular());
                        break;

                    case 2: //both
                        if (!CorrectLessEnemies(ref evade_pos, evade_direction.Perpendicular()))
                            CorrectNearTurret(ref evade_pos, evade_direction.Perpendicular());
                        break;
                }
            }

            edata = new EvadeData
                (evade_pos,
                SpecialMethod.HasFlag(EvadeMethods.MorganaE) || SpecialMethod.HasFlag(EvadeMethods.LissandraR) || SpecialMethod.HasFlag(EvadeMethods.KayleR),
                SpecialMethod.HasFlag(EvadeMethods.SivirE) || SpecialMethod.HasFlag(EvadeMethods.NocturneW) || SpecialMethod.HasFlag(EvadeMethods.VladimirW),
                target);

            m_evade_queue.Enqueue(edata);
        }
Пример #4
0
        /// <summary>
        /// The callback when called spell hit detected
        /// </summary>
        /// <param name="direction">The skillshot direction.</param>
        /// <param name="target">The target.</param>
        public void OnSpellHitDetected(Vector2 direction, Obj_AI_Base target)
        {
            EvadeData edata;

            Vector2 evade_direction = direction.Perpendicular();
            Vector2 evade_pos = ObjectManager.Player.ServerPosition.To2D() + evade_direction * EvadeSpell.Range;

            bool position_needed = SpecialMethod.HasFlag(EvadeMethods.Dash) || SpecialMethod.HasFlag(EvadeMethods.Blink);

            if (position_needed)
            {
                switch (evade.Item("EVADEMETHOD").GetValue<StringList>().SelectedIndex)
                {
                    case 0: //near turret
                        CorrectNearTurret(ref evade_pos, evade_direction);
                        break;

                    case 1: //less enemies
                        CorrectLessEnemies(ref evade_pos, evade_direction);
                        break;

                    case 2: //both
                        if (!CorrectLessEnemies(ref evade_pos, evade_direction))
                            CorrectNearTurret(ref evade_pos, evade_direction);
                        break;
                }
            }

            edata = new EvadeData
                (evade_pos,
                ObjectManager.Player.CharData.BaseSkinName == "Morgana" || ObjectManager.Player.CharData.BaseSkinName == "Lissandra",
                ObjectManager.Player.CharData.BaseSkinName == "Sivir" || ObjectManager.Player.CharData.BaseSkinName == "Nocturne" || ObjectManager.Player.CharData.BaseSkinName == "Vladimir",
                target);

            m_evade_queue.Enqueue(edata);
        }