Esempio n. 1
0
 public static Vector3 GetGrabableObjectPos(bool onlyOrbs)
 {
     if (onlyOrbs)
     {
         return(OrbManager.GetOrbToGrab((int)W.Range));
     }
     foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(minion => minion.IsValidTarget(W.Range)))
     {
         return(minion.ServerPosition);
     }
     return(OrbManager.GetOrbToGrab((int)W.Range));
 }
Esempio n. 2
0
 public static void UseE(Obj_AI_Base target)
 {
     if (target == null)
     {
         return;
     }
     foreach (var orb in OrbManager.GetOrbs(true).Where(orb => orb.To2D().IsValid() && ObjectManager.Player.Distance(orb, true) < Math.Pow(E.Range, 2)))
     {
         var sp = orb.To2D() + Vector2.Normalize(ObjectManager.Player.ServerPosition.To2D() - orb.To2D()) * 100f;
         var ep = orb.To2D() + Vector2.Normalize(orb.To2D() - ObjectManager.Player.ServerPosition.To2D()) * 592;
         Qe.Delay = E.Delay + ObjectManager.Player.Distance(orb) / E.Speed;
         Qe.UpdateSourcePosition(orb);
         var pPo = Qe.GetPrediction(target).UnitPosition.To2D();
         if (pPo.Distance(sp, ep, true, true) <= Math.Pow(Qe.Width + target.BoundingRadius, 2))
         {
             E.Cast(orb);
         }
     }
 }