Beispiel #1
0
        public static float SimulateRealDelayTime(AIHeroClient enemy, int recallEndTick, float aioDmg)
        {
            float fountainReg = GetFountainReg(enemy);

            Events.InvisibleEventArgs invisEntry = Listing.invisEnemiesList.First(x => x.sender.Equals(enemy));

            float regedRecallEnd = SimulateHealthRegen(enemy, invisEntry.StartTime, recallEndTick);
            float hpRecallEnd    = enemy.Health + regedRecallEnd;

            // totalEnemyHp + fountainReg * seconds = myDmg
            float normalDelay = ((aioDmg - hpRecallEnd) / fountainReg) * 1000;


            //Theory: ENEMY REGS NORMAL HP DURING DELAY TIME TO SHOOT IN FOUNTAIN => FALSE

            /*float arriveTime0 = recallEndTick + normalDelay;
             *
             * int start = recallEndTick;
             * int end = (int)arriveTime0;
             *
             * float additional_STD_RegDuringDelay = SimulateHealthRegen(enemy, start, end);
             *
             * // totalEnemyHp + fountainReg * seconds + normalRegAfterRecallFinished * seconds = myDmg <=> time
             * float realDelayTime = ((aioDmg - hpRecallEnd) / (fountainReg + additional_STD_RegDuringDelay)) * 1000;*/

            lastEnemyReg = regedRecallEnd + fountainReg * (normalDelay / 1000);

            return(normalDelay);
        }
        public SnipePrediction(Events.InvisibleEventArgs targetArgs)
        {
            SnipeChance        = HitChance.Impossible;
            target             = targetArgs.sender;
            invisibleStartTime = targetArgs.StartTime;
            lastRealPath       = targetArgs.LastRealPath;

            ultBoundingRadius = Listing.UltSpellDataList[ObjectManager.Player.ChampionName].Width;

            Teleport.OnTeleport += SnipePredictionOnTeleport;
        }