//public int LastECastTime = 0;

        /// <summary>
        ///     The E Rectangle.
        /// </summary>
        /// <param name="unit">The unit.</param>
        public Rectangle ERectangle(AIBaseClient unit)
        {
            var eRect = new Rectangle(Vector3.Zero, Vector3.Zero, SpellClass.E.Width)
            {
                StartPoint = GetBall().Position,
                EndPoint   = LocalPlayer.Instance.Position
            };

            return(eRect);
        }
Example #2
0
        /// <summary>
        ///     The W Rectangle.
        /// </summary>
        /// <param name="unit">The unit.</param>
        /// <param name="mineCoord">The mine coord.</param>
        public Rectangle WRectangle(AIBaseClient unit, Vector3 mineCoord)
        {
            var wPred = SpellClass.W.GetPrediction(unit).CastPosition;
            var wRect = new Rectangle(Vector3.Zero, Vector3.Zero, unit.BoundingRadius)
            {
                StartPoint = wPred,
                EndPoint   = wPred.Extend(mineCoord, WPushDistance)
            };

            return(wRect);
        }
        /// <summary>
        ///     The Q Rectangle.
        /// </summary>
        /// <param name="unit">The unit.</param>
        public Rectangle QRectangle(AIBaseClient unit)
        {
            var qPred = SpellClass.Q.GetPrediction(unit).CastPosition;
            var qRect = new Rectangle(Vector3.Zero, Vector3.Zero, SpellClass.Q2.Width)
            {
                StartPoint = LocalPlayer.Instance.Position,
                EndPoint   = LocalPlayer.Instance.Position.Extend(qPred, SpellClass.Q2.Range)
            };

            return(qRect);
        }
        /// <summary>
        ///     Returns the number of feathers which can hit the target unit.
        /// </summary>
        /// <param name="unit">The unit.</param>
        public int CountFeathersHitOnUnit(AIBaseClient unit)
        {
            var hit = 0;

            foreach (var feather in Feathers)
            {
                var playerToFeatherRectangle = new Entropy.SDK.Geometry.Rectangle(feather.Value, UtilityClass.Player.Position, SpellClass.E.Width);
                if (playerToFeatherRectangle.IsInsidePolygon((Vector2)unit.Position))
                {
                    hit++;
                }
            }

            return(hit);
        }
Example #5
0
        /// <summary>
        ///     Initializes the drawings.
        /// </summary>
        public void OnRender(EntropyEventArgs args)
        {
            /// <summary>
            ///     Loads the Q drawing.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Drawings["q"].As <MenuBool>().Enabled)
            {
                Renderer.DrawCircularRangeIndicator(UtilityClass.Player.Position, SpellClass.Q.Range, Color.LightGreen);
            }

            /// <summary>
            ///     Loads the Feather linking drawing.
            /// </summary>
            if (!UtilityClass.Player.Spellbook.GetSpellState(SpellSlot.E).HasFlag(SpellState.Cooldown) &&
                MenuClass.Drawings["feathers"].As <MenuBool>().Enabled)
            {
                foreach (var feather in Feathers)
                {
                    var drawFeatherPos    = feather.Value.FixHeight();
                    var realFeatherHitbox = new Entropy.SDK.Geometry.Rectangle(UtilityClass.Player.Position, drawFeatherPos, SpellClass.E.Width);

                    realFeatherHitbox.Render(
                        ObjectCache.EnemyHeroes.Any(h =>
                                                    h.IsValidTarget() &&
                                                    realFeatherHitbox.IsInsidePolygon((Vector2)h.Position))
                                                                ? Color.Blue
                                                                : Color.Yellow);
                    CircleRendering.Render(Color.OrangeRed, SpellClass.E.Width, 5, (Vector2)drawFeatherPos);
                }
            }

            /// <summary>
            ///     Loads the R drawing.
            /// </summary>
            if (SpellClass.R.Ready &&
                MenuClass.Drawings["r"].As <MenuBool>().Enabled)
            {
                Renderer.DrawCircularRangeIndicator(UtilityClass.Player.Position, SpellClass.R.Range, Color.Red);
            }
        }