示例#1
0
        private void HandeR(Obj_AI_Base target, Vector3 toVector3, bool toBarrel)
        {
            if (target == null || !toVector3.IsValid())
            {
                return;
            }
            if (target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Stun) ||
                target.HasBuffOfType(BuffType.Suppression) ||
                target.HasBuffOfType(BuffType.Knockup) && !target.HasBuffOfType(BuffType.Knockback) && !target.IsMoving &&
                !target.IsDashing() && !justE)
            {
                var pred = Prediction.GetPrediction(target, 1000f);
                var cast = pred.UnitPosition.Extend(toVector3, -200);
                if (player.Distance(cast) < R.Range && checkBuffs(target, player.Distance(cast)) &&
                    pred.UnitPosition.Distance(target.Position) < 15 &&
                    ((!CombatHelper.CheckWalls(target.Position, toVector3)) ||
                     (toBarrel && savedQ.position.Distance(target.Position) < QExplosionRange)))
                {
                    if (toBarrel &&
                        4000 - savedQ.deltaT() > (player.Distance(cast) + cast.Distance(savedQ.position)) / R.Speed)
                    {
                        R.Cast(cast);
                        return;
                    }
                    else if (!toBarrel)
                    {
                        R.Cast(cast);
                    }
                }
            }

            /*
             * if (!config.Item("insecOnlyStun", true).GetValue<bool>())
             * {
             *  var cast = R.GetPrediction(target, true, 90);
             *  if (cast.Hitchance >= HitChance.VeryHigh)
             *  {
             *      R.Cast(cast.CastPosition.Extend(savedQ.position, -100));
             *  }
             * }*/
        }
示例#2
0
        private static void HandeR(Obj_AI_Base target, Vector3 toVector3, bool toBarrel)
        {
            if (target == null || !toVector3.IsValid())
            {
                return;
            }
            var pred = LeagueSharp.Common.Prediction.GetPrediction(target, target.LSDistance(Player.ServerPosition) / R.Speed);

            if (pred.Hitchance >= HitChance.VeryHigh && !justE && !target.LSIsDashing())
            {
                var cast = pred.UnitPosition.Extend(toVector3, -100);
                if (Player.LSDistance(cast) < R.Range && checkBuffs(target, Player.LSDistance(cast)) && pred.UnitPosition.LSDistance(target.Position) < 15 && ((!CombatHelper.CheckWalls(target.Position, toVector3)) || (toBarrel && savedQ.position.LSDistance(target.Position) < QExplosionRange)))
                {
                    if (toBarrel && 4000 - savedQ.deltaT() > (Player.LSDistance(cast) + cast.LSDistance(savedQ.position)) / R.Speed)
                    {
                        R.Cast(cast);
                        return;
                    }
                    else if (!toBarrel)
                    {
                        R.Cast(cast);
                    }
                }
            }
        }