private static void Clear() { var minionObj = GetMinions(Q2.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth) .Cast <Obj_AI_Base>() .ToList(); if (!minionObj.Any()) { return; } if (GetValue <bool>("Clear", "E") && E.IsReady(GetValue <Slider>("Clear", "EDelay").Value)) { return; } if (GetValue <bool>("Clear", "Q") && Q.IsReady() && !HavePassive) { var obj = minionObj.Where(i => Q.IsInRange(i)) .MaxOrDefault( i => Q2.CountHits(minionObj, Player.ServerPosition.Extend(i.ServerPosition, Q2.Range))); if (obj != null && Q.CastOnUnit(obj)) { return; } } if (GetValue <bool>("Clear", "W") && W.IsReady() && !Player.IsDashing() && !HavePassive) { var pos = W.GetCircularFarmLocation(minionObj.Where(i => W.IsInRange(i)).ToList()); if (pos.MinionsHit > 1) { W.Cast(pos.Position); } else { var obj = minionObj.Where(i => W.GetPrediction(i).Hitchance >= W.MinHitChance) .MinOrDefault(i => i.Distance(Player)); if (obj != null) { W.Cast(obj); } } } }
private void Clear() { var minionObj = MinionManager.GetMinions( Q2.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth); if (!minionObj.Any()) { return; } if (GetValue <bool>("Clear", "E") && E.IsReady(GetValue <Slider>("Clear", "EDelay").Value)) { return; } if (GetValue <bool>("Clear", "Q") && Q.IsReady() && !HavePassive) { var obj = minionObj.Where(i => Q.IsInRange(i)) .MaxOrDefault( i => Q2.CountHits(minionObj, i.ServerPosition.Extend(Player.ServerPosition, -Q2.Range))); if (obj != null && Q.CastOnUnit(obj, PacketCast)) { Utility.DelayAction.Add(300, () => Player.IssueOrder(GameObjectOrder.AttackUnit, obj)); return; } } if (GetValue <bool>("Clear", "W") && W.IsReady() && !Player.IsDashing() && !HavePassive) { var pos = W.GetLineFarmLocation(minionObj.Where(i => W.IsInRange(i)).ToList()); if (pos.MinionsHit > 1) { W.Cast(pos.Position, PacketCast); } else { var obj = minionObj.Where(i => W.GetPrediction(i).Hitchance >= HitChance.High) .MinOrDefault(i => i.Distance(Player)); if (obj != null) { W.CastIfHitchanceEquals(obj, HitChance.Medium, PacketCast); } } } }