Exemplo n.º 1
0
        public void CastQE(Obj_AI_Base target)
        {
            if (GetE.IsReady())
            {
                //    var prediction = Prediction.GetPrediction(target, 500);
                var predictionInput = new PredictionInput
                {
                    Aoe       = false,
                    Collision = EQ.Collision,
                    Speed     = EQ.Speed,
                    Delay     = EQ.Delay,
                    Range     = EQ.Range,
                    From      = HeroManager.Player.ServerPosition,
                    Radius    = EQ.Width,
                    Unit      = target,
                    Type      = SkillshotType.SkillshotLine
                };
                var prediction = Prediction.GetPrediction(predictionInput);


                Vector3 castQpos = prediction.CastPosition;

                if (HeroManager.Player.Distance(castQpos) > GetQ.Range)
                {
                    castQpos = HeroManager.Player.Position.Extend(castQpos, GetE.Range);
                }


                if (prediction.Hitchance >= HitChance.VeryHigh)
                {
                    EQcastNow = true;
                    GetQ.Cast(castQpos);
                }
            }
        }
Exemplo n.º 2
0
        public bool CastQ()
        {
            if (!GetQ.IsReady())
            {
                return(false);
            }
            var qTarget = TargetSelector.GetTarget(GetQ.Range, TargetSelector.DamageType.Magical);

            if (qTarget != null)
            {
                var predictQ = GetQ.GetPrediction(qTarget, true);
                if (predictQ.Hitchance >= HitChance.VeryHigh)
                {
                    return(GetQ.Cast(predictQ.CastPosition));
                }
            }
            return(false);
        }