/// <summary>
        ///     Determines whether the unit is valid.
        /// </summary>
        /// <param name="unit">
        ///     The unit.
        /// </param>
        /// <param name="range">
        ///     The range.
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        private bool IsValidUnit(AttackableUnit unit, float range = 0f)
        {
            var minion = unit as AIMinionClient;

            return(unit.IsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange()) &&
                   (minion == null || minion.IsHPBarRendered));
        }
Beispiel #2
0
 /// <summary>
 ///     Returns true if the target is in auto-attack range.
 /// </summary>
 /// <param name="target">
 ///     The target.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 public static bool InAutoAttackRange(this AttackableUnit target)
 {
     return(target.IsValidTarget() && target.Distance(GameObjects.Player) < target.GetRealAutoAttackRange());
 }
Beispiel #3
0
 /// <summary>
 ///     Determines whether the unit is valid.
 /// </summary>
 /// <param name="unit">
 ///     The unit.
 /// </param>
 /// <param name="range">
 ///     The range.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 private static bool IsValidUnit(AttackableUnit unit, float range = 0f)
 {
     return(unit.IsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange()));
 }
        /// <summary>
        ///     Returns possible minions based on settings.
        /// </summary>
        /// <param name="mode">
        ///     The requested mode
        /// </param>
        /// <returns>
        ///     The <see cref="List{Obj_AI_Minion}" />.
        /// </returns>

        /// <summary>
        ///     Determines whether the unit is valid.
        /// </summary>
        /// <param name="unit">
        ///     The unit.
        /// </param>
        /// <param name="range">
        ///     The range.
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        private bool IsValidUnit(AttackableUnit unit, float range = 0f)
        {
            var minion = unit as Obj_AI_Minion;
            return unit.IsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange())
                   && (minion == null || minion.IsHPBarRendered);
        }
Beispiel #5
0
 /// <summary>
 ///     Returns true if the target is in auto-attack range.
 /// </summary>
 /// <param name="target">
 ///     The target.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 public static bool InAutoAttackRange(this AttackableUnit target)
 {
     return(target.IsValidTarget(target.GetRealAutoAttackRange()));
 }
Beispiel #6
0
 /// <summary>
 ///     Determines whether the unit is valid.
 /// </summary>
 /// <param name="unit">
 ///     The unit.
 /// </param>
 /// <param name="range">
 ///     The range.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 private static bool IsValidUnit(AttackableUnit unit, float range = 0f)
 {
     return unit.LSIsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange());
 }