Ejemplo n.º 1
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     if (BadaoMainVariables.R.Instance.SData.Name == "JhinRShot")
     {
         return;
     }
     if (BadaoJhinHelper.UseQCombo())
     {
         //var info = BadaoJhinHelper.GetQInfo();
         //var target = info.Where(x => x.BounceTargets.LastOrDefault(y => y.Target is AIHeroClient) != null)
         //    .OrderBy(x => x.BounceTargets.LastOrDefault(y => y.Target is AIHeroClient).DeathCount)
         //    .ThenByDescending(x => x.BounceTargets.IndexOf(x.BounceTargets.LastOrDefault(y => y.Target is AIHeroClient)))
         //    .LastOrDefault();
         var target = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Physical);
         if (target.BadaoIsValidTarget())
         {
             BadaoMainVariables.Q.Cast(target);
         }
     }
     if (BadaoJhinHelper.UseWOnlySnareCombo())
     {
         foreach (var hero in HeroManager.Enemies.Where(a => a.BadaoIsValidTarget() && BadaoJhinHelper.HasJhinPassive(a)))
         {
             var b = BadaoMainVariables.W.GetPrediction(hero).CastPosition;
             var c = BadaoMainVariables.W.GetPrediction(hero).CollisionObjects;
             if (!c.Any(d => d.IsChampion()) && ObjectManager.Player.Distance(b) <= BadaoMainVariables.W.Range)
             {
                 if (BadaoMainVariables.W.Cast(b))
                 {
                     break;
                 }
             }
         }
     }
     if (BadaoJhinHelper.UseWCombo())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.W.Range, TargetSelector.DamageType.Physical);
         if (target.BadaoIsValidTarget())
         {
             var x = BadaoMainVariables.W.GetPrediction(target).CastPosition;
             var y = BadaoMainVariables.W.GetPrediction(target).CollisionObjects;
             if (!y.Any(z => z.IsChampion()) && ObjectManager.Player.Distance(x) <= BadaoMainVariables.W.Range)
             {
                 BadaoMainVariables.W.Cast(x);
             }
             else
             {
                 foreach (var hero in HeroManager.Enemies.Where(a => a.BadaoIsValidTarget() && BadaoJhinHelper.HasJhinPassive(a)))
                 {
                     var b = BadaoMainVariables.W.GetPrediction(hero).CastPosition;
                     var c = BadaoMainVariables.W.GetPrediction(hero).CollisionObjects;
                     if (!c.Any(d => d.IsChampion()) && ObjectManager.Player.Distance(b) <= BadaoMainVariables.W.Range)
                     {
                         if (BadaoMainVariables.W.Cast(b))
                         {
                             break;
                         }
                     }
                 }
             }
         }
     }
     if (BadaoJhinHelper.UseECombo())
     {
         var target = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Physical);
         if (target.BadaoIsValidTarget())
         {
             BadaoMainVariables.E.Cast(target.Position);
         }
     }
 }