コード例 #1
0
ファイル: Yasuo.cs プロジェクト: Xelamats/PortAIO
 private static bool CanDash(
     Obj_AI_Base target,
     bool inQCir = false,
     bool underTower = true,
     Vector3 pos = new Vector3())
 {
     if (HaveE(target))
     {
         return false;
     }
     if (!pos.IsValid())
     {
         pos = target.ServerPosition;
     }
     var posAfterE = GetPosAfterDash(target);
     return (underTower || !posAfterE.IsUnderEnemyTurret())
            && posAfterE.Distance(pos) < (inQCir ? Q3.Range : pos.DistanceToPlayer())
            && Evade.IsSafePoint(posAfterE.ToVector2()).IsSafe;
 }
コード例 #2
0
ファイル: Yasuo.cs プロジェクト: 47110572/LeagueSharp-10
 private static bool DashCheck(
     Obj_AI_Base target,
     bool inQCir = false,
     bool underTower = true,
     Vector3 pos = new Vector3())
 {
     if (!pos.IsValid())
     {
         pos = target.ServerPosition;
     }
     var posAfterE = PosAfterE(target);
     return CanCastE(target) && (underTower || !posAfterE.IsUnderEnemyTurret())
            && posAfterE.Distance(pos) <= (inQCir ? QCirWidth : pos.DistanceToPlayer())
            && Evade.IsSafePoint(posAfterE).IsSafe;
 }
コード例 #3
0
ファイル: LeeSin.cs プロジェクト: 47110572/LeagueSharp-10
 private static void Flee(Vector3 pos, bool isStar = false)
 {
     if (!W.IsReady() || !IsWOne || Variables.TickCount - W.LastCastAttemptT <= 1000)
     {
         return;
     }
     var objJump =
         GameObjects.AllyHeroes.Where(i => !i.IsMe)
             .Cast<Obj_AI_Base>()
             .Concat(
                 GameObjects.AllyMinions.Where(
                     i => i.IsMinion() || i.IsPet() || SpecialPet.Contains(i.CharData.BaseSkinName.ToLower()))
                     .Concat(GameObjects.AllyWards.Where(i => i.IsWard())))
             .Where(
                 i =>
                 i.IsValidTarget(W.Range, false)
                 && i.Distance(Player.ServerPosition.Extend(pos, Math.Min(pos.DistanceToPlayer(), W.Range)))
                 < (isStar ? R.Range - 50 : 250))
             .MinOrDefault(i => i.Distance(pos));
     if (objJump != null)
     {
         W.CastOnUnit(objJump);
     }
     else
     {
         WardManager.Place(pos, false, true);
     }
 }
コード例 #4
0
 internal static void Place(Vector3 pos, int mode = 0)
 {
     if (!CanWardJump)
     {
         return;
     }
     lastPlacePos = pos.DistanceToPlayer() < WardRange ? pos : Player.ServerPosition.LSExtend(pos, WardRange);
     switch (mode)
     {
         case 0:
             lastPlaceTime = Variables.TickCount + 1100;
             break;
         case 1:
             lastPlaceTime = Insec.LastWardTime = Insec.LastJumpTme = Variables.TickCount;
             break;
     }
     Player.Spellbook.CastSpell(Items.GetWardSlot().SpellSlot, lastPlacePos);
 }
コード例 #5
0
ファイル: LeeSin.cs プロジェクト: 47110572/LeagueSharp-10
 internal static void Place(Vector3 pos, bool isInsecByWard = false, bool isFlee = false)
 {
     if (!CanWardJump)
     {
         return;
     }
     var ward = Common.GetWardSlot();
     if (ward == null)
     {
         return;
     }
     var posEnd = Player.ServerPosition.Extend(pos, Math.Min(pos.DistanceToPlayer(), WardRange));
     Player.Spellbook.CastSpell(ward.SpellSlot, posEnd);
     if (isInsecByWard)
     {
         LastPlaceTime = Variables.TickCount;
     }
     lastJumpPos = posEnd.ToVector2();
     lastJumpTime = Variables.TickCount;
     if (isFlee)
     {
         lastJumpTime += 1100;
     }
 }