Пример #1
0
        public static bool CastOKTW(Obj_AI_Hero target, OKTWPrediction.HitChance hitChance)
        {
            var spell  = Thresh.Q;
            var Player = Thresh.Player;

            OKTWPrediction.SkillshotType CoreType2 = OKTWPrediction.SkillshotType.SkillshotLine;
            bool aoe2 = false;

            var predInput2 = new OKTWPrediction.PredictionInput
            {
                Aoe       = aoe2,
                Collision = spell.Collision,
                Speed     = spell.Speed,
                Delay     = spell.Delay,
                Range     = spell.Range,
                From      = Player.ServerPosition,
                Radius    = spell.Width,
                Unit      = target,
                Type      = CoreType2
            };
            var poutput2 = OKTWPrediction.Prediction.GetPrediction(predInput2);

            if (spell.Speed != float.MaxValue && OKTWPrediction.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
            {
                return(false);
            }

            if (poutput2.Hitchance >= hitChance)
            {
                return(spell.Cast(poutput2.CastPosition));
            }
            return(false);
        }
Пример #2
0
		public static bool CastOKTW(Obj_AI_Hero target, OKTWPrediction.HitChance hitChance) {
			var spell = SnowBall;

			OKTWPrediction.SkillshotType CoreType2 = OKTWPrediction.SkillshotType.SkillshotLine;
			bool aoe2 = false;

			var predInput2 = new OKTWPrediction.PredictionInput
			{
				Aoe = aoe2,
				Collision = spell.Collision,
				Speed = spell.Speed,
				Delay = spell.Delay,
				Range = spell.Range,
				From = Player.ServerPosition,
				Radius = spell.Width,
				Unit = target,
				Type = CoreType2
			};
			var poutput2 = OKTWPrediction.Prediction.GetPrediction(predInput2);
			if (poutput2.Hitchance >= hitChance)
			{
				return spell.Cast(poutput2.CastPosition);
			}
			return false;
		}