Exemple #1
0
        private static void BaseUltCalcs(Recall recall)
        {
            float recallEndTime   = recall.Started + recall.Duration;
            float timeNeeded      = GetBaseUltTravelTime(Player);
            float recallCountDown = recallEndTime - Core.GameTickCount;
            float delay           = recallEndTime - timeNeeded;

            bool collision = Program.BaseUltMenu["checkcollision"].Cast <CheckBox>().CurrentValue ? GetCollision(Player.ChampionName).Any() : false;
            var  spellData = BaseUltSpells.Find(h => h.Name == Player.ChampionName);
            var  Target    = enemiesInfo.FirstOrDefault(x => x.Player.Equals(recall.Unit));

            if (Target == null)
            {
                return;
            }

            if (recallCountDown >= timeNeeded && !collision && IsTargetKillable(Target, recallCountDown) &&
                Program.BaseUltMenu["target" + recall.Unit.ChampionName].Cast <CheckBox>().CurrentValue &&
                Program.BaseUltMenu["baseult"].Cast <CheckBox>().CurrentValue)
            {
                BaseUltUnits.Add(new BaseUltUnit(recall.Unit, delay));
            }
            else if (BaseUltUnits.Any(h => h.Unit.NetworkId == recall.Unit.NetworkId))
            {
                BaseUltUnits.Remove(BaseUltUnits.Find(h => h.Unit.NetworkId == recall.Unit.NetworkId));
            }
        }
        private static double GetRecallPercent(Recall recall)
        {
            var recallDuration = recall.Duration;
            var cd             = recall.Started + recallDuration - Game.Time;
            var percent        = (cd > 0 && Math.Abs(recallDuration) > float.Epsilon) ? 1f - (cd / recallDuration) : 1f;

            return(percent);
        }
        private static void BaseUltCalcs(Recall recall)
        {
            var finishedRecall = recall.Started + recall.Duration;
            var spellData      = BaseUltSpells.Find(h => h.Name == Player.ChampionName);
            var timeNeeded     = GetBaseUltTravelTime(spellData.Delay, spellData.Speed);
            var fireTime       = finishedRecall - timeNeeded;
            var spellDmg       = GetBaseUltSpellDamage(spellData, recall.Unit);
            var collision      = GetCollision(spellData.Radius, spellData).Any();

            if (fireTime > Game.Time && fireTime < recall.Started + recall.Duration && recall.Unit.Health < spellDmg &&
                Program.BaseUltMenu["target" + recall.Unit.ChampionName].Cast <CheckBox>().CurrentValue&&
                Program.BaseUltMenu["baseult"].Cast <CheckBox>().CurrentValue&&
                !Program.BaseUltMenu["nobaseult"].Cast <KeyBind>().CurrentValue)
            {
                BaseUltUnits.Add(new BaseUltUnit(recall.Unit, fireTime, collision));
            }
            else if (BaseUltUnits.Any(h => h.Unit.NetworkId == recall.Unit.NetworkId))
            {
                BaseUltUnits.Remove(BaseUltUnits.Find(h => h.Unit.NetworkId == recall.Unit.NetworkId));
            }
        }
Exemple #4
0
        private static void BaseUltCalcs(Recall recall)
        {
            float recallEndTime = recall.Started + recall.Duration;
            float timeNeeded = GetBaseUltTravelTime(Player);
            float recallCountDown = recallEndTime - Core.GameTickCount;
            float delay = recallEndTime - timeNeeded;

            bool collision = Program.BaseUltMenu["checkcollision"].Cast<CheckBox>().CurrentValue ? GetCollision(Player.ChampionName).Any() : false;
            var spellData = BaseUltSpells.Find(h => h.Name == Player.ChampionName);
            var Target = enemiesInfo.FirstOrDefault(x => x.Player.Equals(recall.Unit));

            if (Target == null)
                return;

            if (recallCountDown >= timeNeeded && !collision && IsTargetKillable(Target, recallCountDown)
                && Program.BaseUltMenu["target" + recall.Unit.ChampionName].Cast<CheckBox>().CurrentValue
                && Program.BaseUltMenu["baseult"].Cast<CheckBox>().CurrentValue)
            {
                BaseUltUnits.Add(new BaseUltUnit(recall.Unit, delay));
            }
            else if (BaseUltUnits.Any(h => h.Unit.NetworkId == recall.Unit.NetworkId))
            {
                BaseUltUnits.Remove(BaseUltUnits.Find(h => h.Unit.NetworkId == recall.Unit.NetworkId));
            }
        }
 private static void BaseUltCalcs(Recall recall)
 {
     var finishedRecall = recall.Started + recall.Duration;
     var spellData = BaseUltSpells.Find(h => h.Name == Player.ChampionName);
     var timeNeeded = GetBaseUltTravelTime(spellData.Delay, spellData.Speed);
     var fireTime = finishedRecall - timeNeeded;
     var spellDmg = GetBaseUltSpellDamage(spellData, recall.Unit);
     var collision = GetCollision(spellData.Radius, spellData).Any();
     if (fireTime > Game.Time && fireTime < recall.Started + recall.Duration && recall.Unit.Health < spellDmg &&
         Program.BaseUltMenu["target" + recall.Unit.ChampionName].Cast<CheckBox>().CurrentValue &&
         Program.BaseUltMenu["baseult"].Cast<CheckBox>().CurrentValue &&
         !Program.BaseUltMenu["nobaseult"].Cast<KeyBind>().CurrentValue)
     {
         BaseUltUnits.Add(new BaseUltUnit(recall.Unit, fireTime, collision));
     }
     else if (BaseUltUnits.Any(h => h.Unit.NetworkId == recall.Unit.NetworkId))
     {
         BaseUltUnits.Remove(BaseUltUnits.Find(h => h.Unit.NetworkId == recall.Unit.NetworkId));
     }
 }
 private static double GetRecallPercent(Recall recall)
 {
     var recallDuration = recall.Duration;
     var cd = recall.Started + recallDuration - Game.Time;
     var percent = (cd > 0 && Math.Abs(recallDuration) > float.Epsilon) ? 1f - (cd/recallDuration) : 1f;
     return percent;
 }