コード例 #1
0
ファイル: SOLOAntigapcloser.cs プロジェクト: roaxtreil/EBRepo
        /// <summary>
        ///     Called when an enemy gapcloser is casted on the player.
        /// </summary>
        /// <param name="gapcloser">The gapcloser.</param>
        private void OnEnemyGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs gapcloser)
        {
            var antigapcloserEnabled =
                MenuGenerator.MiscMenu["TDVaynemiscmiscellaneousantigapcloser"].Cast<CheckBox>().CurrentValue;
            var endPosition = gapcloser.End;

            if (!antigapcloserEnabled || !Variables.E.IsReady() || !gapcloser.Sender.IsValidTarget() ||
                ObjectManager.Player.Distance(endPosition) > 400)
            {
                return;
            }

            //Smart
            var ShouldBeRepelled = CustomAntiGapcloser.SpellShouldBeRepelledOnSmartMode(gapcloser.SpellName);

            if (ShouldBeRepelled)
            {
                Core.DelayAction(() => { Variables.E.Cast(gapcloser.Sender); },
                    MenuGenerator.MiscMenu["TDVaynemiscmiscellaneousdelay"].Cast<Slider>().CurrentValue);
            }
            else
            {
                //Use Q
                var extendedPosition = ObjectManager.Player.ServerPosition.Extend(endPosition, -300f);
                if (!extendedPosition.IsUnderTurret() &&
                    !(extendedPosition.CountEnemiesInRange(400f) >= 2 && extendedPosition.CountAlliesInRange(400f) < 3))
                {
                    Core.DelayAction(() => { Player.CastSpell(SpellSlot.Q, extendedPosition.To3D()); },
                        MenuGenerator.MiscMenu["TDVaynemiscmiscellaneousdelay"].Cast<Slider>().CurrentValue);
                }
            }
        }
コード例 #2
0
ファイル: EventManager.cs プロジェクト: nld-eb/EloBuddy
 public static void Gapcloser_OnGapCloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
 {
     _Gapclose.GapcloseE(sender, e);
 }