Exemplo n.º 1
0
 private void OnEnemyGapcloser(object sender, GapcloserManagerArgs args)
 {
     try
     {
         if (args.UniqueId == "e-gapcloser" && E.IsReady() &&
             BestTargetOnlyManager.Check("e-gapcloser", E, args.Hero))
         {
             if (args.End.Distance(Player.Position) <= E.Range)
             {
                 E.Cast(args.End);
             }
         }
         if (string.IsNullOrEmpty(args.UniqueId))
         {
             if (_ultimate.IsActive(UltimateModeType.Gapcloser, args.Hero) &&
                 BestTargetOnlyManager.Check("r-gapcloser", R, args.Hero))
             {
                 RLogic(UltimateModeType.Gapcloser, HitChance.High, args.Hero);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 2
0
 private void OnEnemyGapcloser(object sender, GapcloserManagerArgs args)
 {
     try
     {
         if (args.UniqueId.Equals("q-gapcloser") && Q.IsReady() &&
             BestTargetOnlyManager.Check("q-gapcloser", Q, args.Hero))
         {
             if (args.End.Distance(Player.Position) <= Q.Range)
             {
                 var delay = (int) (args.EndTime - Game.Time - Q.Delay - 0.1f);
                 if (delay > 0)
                 {
                     Utility.DelayAction.Add(delay * 1000, () => Q.Cast(args.End));
                 }
                 else
                 {
                     Q.Cast(args.End);
                 }
             }
         }
         if (args.UniqueId.Equals("w-gapcloser") && W.IsReady() &&
             BestTargetOnlyManager.Check("w-gapcloser", W, args.Hero))
         {
             if (args.End.Distance(Player.Position) <= W.Range)
             {
                 var delay = (int) (args.EndTime - Game.Time - W.Delay - 0.1f);
                 if (delay > 0)
                 {
                     Utility.DelayAction.Add(delay * 1000, () => W.Cast(args.End));
                 }
                 else
                 {
                     W.Cast(args.End);
                 }
             }
         }
         if (string.IsNullOrEmpty(args.UniqueId))
         {
             if (Ultimate.IsActive(UltimateModeType.Gapcloser, args.Hero) &&
                 BestTargetOnlyManager.Check("r-gapcloser", R, args.Hero))
             {
                 if (args.End.Distance(Player.Position) <= R.Range)
                 {
                     if (args.EndTime - Game.Time > R.Delay)
                     {
                         Utility.DelayAction.Add(
                             (int) ((args.EndTime - Game.Time - R.Delay) * 1000), () => R.Cast(args.End));
                     }
                     else
                     {
                         R.Cast(args.End);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 3
0
 private void OnEnemyGapcloser(object sender, GapcloserManagerArgs args)
 {
     try
     {
         if (args.UniqueId == "q-gapcloser" && Q.IsReady() &&
             BestTargetOnlyManager.Check("q-gapcloser", Q, args.Hero))
         {
             if (args.End.Distance(Player.Position) <= Q.Range)
             {
                 var delay = (int) (args.EndTime - Game.Time - Q.Delay - 0.1f);
                 if (delay > 0)
                 {
                     Utility.DelayAction.Add(delay * 1000, () => Q.Cast(args.End));
                 }
                 else
                 {
                     Q.Cast(args.End);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 4
0
 private void OnEnemyGapcloser(object sender, GapcloserManagerArgs args)
 {
     try
     {
         if (args.UniqueId.Equals("w-gapcloser") && W.IsReady() &&
             BestTargetOnlyManager.Check("w-gapcloser", W, args.Hero))
         {
             if (args.End.Distance(Player.Position) <= W.Range)
             {
                 W.Cast(args.End);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 5
0
 private void OnEnemyGapcloser(object sender, GapcloserManagerArgs args)
 {
     try
     {
         if (args.UniqueId.Equals("e-gapcloser") && E.IsReady() &&
             BestTargetOnlyManager.Check("e-gapcloser", E, args.Hero))
         {
             if (args.End.Distance(Player.Position) <= E.Range)
             {
                 E.Cast(args.End);
             }
         }
         if (args.UniqueId.Equals("r-gapcloser") && R.IsReady() &&
             BestTargetOnlyManager.Check("r-gapcloser", R, args.Hero) &&
             Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue<Slider>().Value > GetRBuffCount())
         {
             if (args.End.Distance(Player.Position) <= R.Range)
             {
                 R.Cast(args.End);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Gap closer event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void GapcloserManager_OnGapcloser(object sender, GapcloserManagerArgs args)
 {
     try
     {
         if (args.UniqueId == "e-gapcloser" && E.IsReady() &&
             BestTargetOnlyManager.Check("e-gapcloser", E, args.Hero) &&
             args.End.Distance(Player.Position) <= E.Range)
         {
             E.Cast(args.End);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }