コード例 #1
0
ファイル: ShadowManager.cs プロジェクト: wade1990/PortAIO
        /// <summary>
        ///     Checks if the player can go to the selected Shadow.
        /// </summary>
        /// <param name="shadow">The shadow</param>
        /// <returns></returns>
        public static bool CanGoToShadow(Shadow shadow) //TODO safety Checks lel
        {
            if (MenuHelper.IsMenuEnabled("safetyChecks") && !MenuHelper.GetKeybindValue("fleeActive"))
            {
                if (shadow.State == ShadowState.Created)
                {
                    if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) ||
                        (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 &&
                         shadow.ShadowObject.CountEnemiesInRange(1200f) < 2))
                    // add a slider for the health percent.
                    {
                        return(false);
                    }
                }
            }

            return(shadow.State == ShadowState.Created);
        }
コード例 #2
0
ファイル: VectorHelper.cs プロジェクト: wade1990/PortAIO
        public static Vector3[] GetVertices(AIHeroClient target, bool forZhonyas = false) //TODO Zhonyas triangular ult
        {
            Shadow ultShadow = ShadowManager.RShadow;

            if (!ultShadow.Exists)
            {
                return(new[] { Vector3.Zero, Vector3.Zero });
            }

            if (forZhonyas)
            {
                Vector2 vertex1 = ObjectManager.Player.ServerPosition.To2D() +
                                  Vector2.Normalize(
                    ObjectManager.Player.ServerPosition.To2D() +
                    Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D()) *
                    Zed._spells[SpellSlot.W].Range - ObjectManager.Player.ServerPosition.To2D() +
                    Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D())
                    .Perpendicular() * Zed._spells[SpellSlot.W].Range).Perpendicular() *
                                  Zed._spells[SpellSlot.W].Range;
                //
                Vector2 vertex2 = ObjectManager.Player.ServerPosition.To2D() +
                                  Vector2.Normalize(
                    ObjectManager.Player.ServerPosition.To2D() +
                    Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D())
                    .Perpendicular() * Zed._spells[SpellSlot.W].Range -
                    ObjectManager.Player.ServerPosition.To2D() +
                    Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D()) *
                    Zed._spells[SpellSlot.W].Range).Perpendicular() * Zed._spells[SpellSlot.W].Range;

                return(new[] { vertex1.To3D(), vertex2.To3D() });
            }

            Vector2 vertex3 = ObjectManager.Player.ServerPosition.To2D() +
                              Vector2.Normalize(
                target.ServerPosition.To2D() - ultShadow.ShadowObject.ServerPosition.To2D())
                              .Perpendicular() * Zed._spells[SpellSlot.W].Range;
            Vector2 vertex4 = ObjectManager.Player.ServerPosition.To2D() +
                              Vector2.Normalize(
                ultShadow.ShadowObject.ServerPosition.To2D() - target.ServerPosition.To2D())
                              .Perpendicular() * Zed._spells[SpellSlot.W].Range;

            return(new[] { vertex3.To3D(), vertex4.To3D() });
        }
コード例 #3
0
ファイル: ShadowManager.cs プロジェクト: riwalry1/AIO
        /// <summary>
        ///     Checks if the player can go to the selected Shadow.
        /// </summary>
        /// <param name="shadow">The shadow</param>
        /// <returns></returns>
        public static bool CanGoToShadow(Shadow shadow) //TODO safety Checks lel
        {
            if (Zed.getCheckBoxItem(Zed.miscMenu, "safetyChecks") &&
                (!Zed.getKeyBindItem(Zed.fleeMenu, "fleeActive") ||
                 !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)))
            {
                if (shadow.State == ShadowState.Created)
                {
                    if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) ||
                        (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 &&
                         shadow.ShadowObject.CountEnemiesInRange(1200f) < 2))
                    {
                        return(false);
                    }
                }
            }

            return(shadow.State == ShadowState.Created);
        }
コード例 #4
0
ファイル: ShadowManager.cs プロジェクト: yMeliodasNTD/PortAIO
        //TODO safety Checks lel
        /// <summary>
        ///     Checks if the player can go to the selected Shadow.
        /// </summary>
        /// <param name="shadow">The shadow</param>
        /// <returns></returns>
        public static bool CanGoToShadow(Shadow shadow)
        {
            if (Zed.getCheckBoxItem(Zed.miscMenu, "safetyChecks") &&
                (!Zed.getKeyBindItem(Zed.fleeMenu, "fleeActive") ||
                 !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)))
            {
                if (shadow.State == ShadowState.Created)
                {
                    if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) ||
                        (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 &&
                         shadow.ShadowObject.CountEnemiesInRange(1200f) < 2))
                    {
                        return false;
                    }
                }
            }

            return shadow.State == ShadowState.Created;
        }
コード例 #5
0
        /// <summary>
        ///     Checks if the player can go to the selected Shadow.
        /// </summary>
        /// <param name="shadow">The shadow</param>
        /// <returns></returns>
        public static bool CanGoToShadow(Shadow shadow) //TODO safety Checks lel
        {
            if (MenuHelper.IsMenuEnabled("safetyChecks") && !MenuHelper.GetKeybindValue("fleeActive"))
            {
                if (shadow.State == ShadowState.Created)
                {
                    if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) ||
                        (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 &&
                         shadow.ShadowObject.CountEnemiesInRange(1200f) < 2))
                        // add a slider for the health percent.
                    {
                        return false;
                    }
                }
            }

            return shadow.State == ShadowState.Created;
        }