コード例 #1
0
ファイル: Health.cs プロジェクト: mapiracha/Berb.Common
 /// <summary>
 ///     Returns the health prediction, either default or simulated
 /// </summary>
 /// <param name="unit"><see cref="Obj_AI_Base" /> unit</param>
 /// <param name="time">The time in milliseconds</param>
 /// <param name="delay">An optional delay</param>
 /// <param name="type"><see cref="HealthPredictionType" /> type</param>
 /// <returns>
 ///     The <see cref="float" />
 /// </returns>
 public static float GetPrediction(
     Obj_AI_Base unit,
     int time,
     int delay = 70,
     HealthPredictionType type = HealthPredictionType.Default)
 {
     return(EloBuddy.SDK.Prediction.Health.GetPrediction(unit, time));
 }
コード例 #2
0
 /// <summary>
 ///     Returns the health prediction, either default or simulated
 /// </summary>
 /// <param name="unit"><see cref="Obj_AI_Base" /> unit</param>
 /// <param name="time">The time in milliseconds</param>
 /// <param name="delay">An optional delay</param>
 /// <param name="type"><see cref="HealthPredictionType" /> type</param>
 /// <returns></returns>
 public static float GetPrediction(Obj_AI_Base unit,
                                   int time,
                                   int delay = 70,
                                   HealthPredictionType type = HealthPredictionType.Default)
 {
     return(type == HealthPredictionType.Simulated
         ? GetPredictionSimulated(unit, time, delay)
         : GetPredictionDefault(unit, time, delay));
 }
コード例 #3
0
ファイル: Health.cs プロジェクト: 8569482/LeagueSharp.SDK
 /// <summary>
 ///     Returns the health prediction, either default or simulated
 /// </summary>
 /// <param name="unit"><see cref="Obj_AI_Base" /> unit</param>
 /// <param name="time">The time in milliseconds</param>
 /// <param name="delay">An optional delay</param>
 /// <param name="type"><see cref="HealthPredictionType" /> type</param>
 /// <returns>The <see cref="float" /></returns>
 public static float GetPrediction(
     Obj_AI_Base unit, 
     int time, 
     int delay = 70, 
     HealthPredictionType type = HealthPredictionType.Default)
 {
     return type == HealthPredictionType.Simulated
                ? GetPredictionSimulated(unit, time)
                : GetPredictionDefault(unit, time, delay);
 }
コード例 #4
0
 /// <summary>
 ///     Returns the best killable minion (if any)
 /// </summary>
 /// <param name="types"><see cref="MinionTypes" /> as filter</param>
 /// <param name="predictionType"><see cref="HealthPredictionType" /> to support both lane clear/last hit</param>
 /// <param name="adModifier">A modifier value for the lane freeze, passed as <see cref="float" /></param>
 /// <returns></returns>
 private Obj_AI_Base GetKillableMinion(MinionTypes types = MinionTypes.All,
                                       HealthPredictionType predictionType = HealthPredictionType.Default,
                                       double adModifier = 1.0)
 {
     return
         (MinionManager.GetMinions(
              ObjectHandler.Player.ServerPosition, ObjectHandler.Player.GetRealAutoAttackRange() + 65, types)
          .Where(CanGetOrbwalked)
          .Select(
              minion =>
              new
     {
         minion,
         predictedHealth =
             Health.GetPrediction(minion, (int)minion.GetTimeToHit(), 20, predictionType)
     })
          .Where(@t => @t.predictedHealth > 0 &&
                 @t.predictedHealth <= ObjectManager.Player.GetAutoAttackDamage(@t.minion) * adModifier)
          .Select(@t => @t.minion).FirstOrDefault());
 }
コード例 #5
0
ファイル: HealthWrapper.cs プロジェクト: symbiosismm/Releases
 public static float GetPrediction(Obj_AI_Base unit, int time, int delay = 0, HealthPredictionType type = HealthPredictionType.Default)
 {
     return(Health.GetPrediction(unit, time, delay, type));
 }
コード例 #6
0
ファイル: Health.cs プロジェクト: CONANLXF/Berb.Common
 /// <summary>
 ///     Returns the health prediction, either default or simulated
 /// </summary>
 /// <param name="unit"><see cref="Obj_AI_Base" /> unit</param>
 /// <param name="time">The time in milliseconds</param>
 /// <param name="delay">An optional delay</param>
 /// <param name="type"><see cref="HealthPredictionType" /> type</param>
 /// <returns>
 ///     The <see cref="float" />
 /// </returns>
 public static float GetPrediction(
     Obj_AI_Base unit,
     int time,
     int delay = 70,
     HealthPredictionType type = HealthPredictionType.Default)
 {
     return EloBuddy.SDK.Prediction.Health.GetPrediction(unit, time);
 }