當前位置: 首頁>>代碼示例>>C#>>正文


C# AIHeroClient.LSIsValidTarget方法代碼示例

本文整理匯總了C#中AIHeroClient.LSIsValidTarget方法的典型用法代碼示例。如果您正苦於以下問題:C# AIHeroClient.LSIsValidTarget方法的具體用法?C# AIHeroClient.LSIsValidTarget怎麽用?C# AIHeroClient.LSIsValidTarget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.LSIsValidTarget方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: TwoChainsActive

        public static void TwoChainsActive(AIHeroClient target)
        {
            //string t = "";
            //if (target.IsValidTarget())
            //{
            //    foreach (var x in target.Buffs)
            //    {
            //        t += ", " + x.Name;
            //    }
            //    Game.PrintChat(t);
            //}

            R2.SetSkillshot(0.25f, 70, 1600, true, SkillshotType.SkillshotLine);
            Orbwalker.MoveTo(Game.CursorPos);
            if (target != null && target.LSIsValidTarget(Program.Q.Range) && (Program.Rstate != 3 || !R2.IsReady()))
            {
                Program.Q.Cast(target);
            }
            if (target != null && target.LSIsValidTarget(Program.E.Range) && Program.E.IsReady() && !ObjectManager.Player.LSIsDashing()
                 && !target.HasBuff("LeblancSoulShackleM") && Environment.TickCount - LastChainM >= 1500 + Game.Ping)
            {
                Program.E.Cast(target);
                LastChain = Environment.TickCount;
            }
            if (target != null && target.LSIsValidTarget(Program.E.Range) && Program.R.IsReady() && !ObjectManager.Player.LSIsDashing() && Program.Rstate == 3
                && !target.HasBuff("LeblancSoulShackle") && Environment.TickCount - LastChain >= 1500 + Game.Ping)
            {
                R2.Cast(target);
                LastChainM = Environment.TickCount;
            }
            if (target.LSIsValidTarget(Program.W.Range) && Program.getCheckBoxItem(Program.spellMenu, "Wcombo") && (Program.Rstate != 3 || !R2.IsReady()))
            {
                Program.CastW(target);
            }
        }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:35,代碼來源:TwoChains.cs

示例2: OnInterruptableTarget

        public static void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!MenuConfig.InterruptMenu || sender.IsInvulnerable) return;

            if (sender.LSIsValidTarget(Spells.W.Range))
            {
                if (Spells.W.IsReady())
                {
                    Spells.W.Cast(sender);
                }
            }
        }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:12,代碼來源:Interrupt2.cs

示例3: Interrupter2_OnInterruptableTarget

        private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            var PacketCast = getCheckBoxItem(SkyLv_Taric.Misc, "Taric.UsePacketCast");

            if (Player.LSIsRecalling() || sender.IsAlly) return;

            if (getCheckBoxItem(SkyLv_Taric.Misc, "Taric.AutoEInterrupt") && E.IsReady() && sender.LSIsValidTarget(E.Range))
                E.Cast(sender, PacketCast);

            if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseEFromAlly") && E.IsReady() && Player.Mana >= E.ManaCost)
            {
                foreach (var AllyHero in ObjectManager.Get<AIHeroClient>().Where(a => !a.IsMe && !a.IsDead && a.Team == ObjectManager.Player.Team && Player.LSDistance(a) < 1600 && (a.HasBuff("TaricWAllyBuff") || a.HasBuff("TaricW"))))
                {
                    var Allytarget = ObjectManager.Get<AIHeroClient>().Where(t => !t.IsDead && t.Team != ObjectManager.Player.Team && AllyHero.LSDistance(t) < E.Range).FirstOrDefault();

                    if (getCheckBoxItem(SkyLv_Taric.Combo, AllyHero.NetworkId + "TargetInterruptEComboFromAlly") && Allytarget.NetworkId == sender.NetworkId)
                    {
                        E.Cast(sender.ServerPosition, PacketCast);
                        return;
                    }
                }
            }
        }
開發者ID:yashine59fr,項目名稱:PortAIO-1,代碼行數:23,代碼來源:Interrupter.cs

示例4: AutoKill

        private static bool AutoKill()
        {
            var wRange = W.IsReady() && W.IsFirstW() && getCheckBoxItem(ksMenu, "KSGapclose") ? W.Range : 0;
            var enemies =
                HeroManager.Enemies.Where(
                    enemy =>
                        enemy.LSIsValidTarget(wRange + E.Range) && !enemy.IsZombie &&
                        enemy.Health < GetComboDamage(enemy, SpellSlot.Q, WCastTime)).ToList();

            if (!enemies.Any())
            {
                return false;
            }

            if (!KSTarget.LSIsValidTarget(wRange + E.Range))
            {
                KSTarget = null;
            }

            KSTarget = enemies.MinOrDefault(e => e.Health);

            if (KSTarget == null || !KSTarget.IsValid)
            {
                return false;
            }

            var pos = Player.ServerPosition.LSExtend(KSTarget.ServerPosition, W.Range);

            if (!E.IsInRange(KSTarget) && KSTarget.LSIsValidTarget(E.Range + W.Range) &&
                KSTarget.Health < GetKSDamage(KSTarget, false, pos))
            {
                if (!pos.IsValidWPoint() || !W.IsFirstW() || !W.Cast(pos))
                {
                    return false;
                }

                Console.WriteLine("KS: Gapclose W");
                return true;
            }

            if (KSTarget.Health < GetKSDamage(KSTarget))
            {
                Combo(KSTarget, true);
                return true;
            }

            return false;
        }
開發者ID:,項目名稱:,代碼行數:48,代碼來源:

示例5: Interrupter2_OnInterruptableTarget

        private static void Interrupter2_OnInterruptableTarget(AIHeroClient t, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!getCheckBoxItem(qMenu, "intQ") || !Q.IsReady())
                return;

            if (t.LSIsValidTarget(Q.Range))
            {
                Q.Cast(t);
            }
        }
開發者ID:yashine59fr,項目名稱:PortAIO-1,代碼行數:10,代碼來源:Program.cs

示例6: Interrupter2_OnInterruptableTarget

 private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender,
     Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.IsReady() && sender.LSIsValidTarget(E.Range) && getCheckBoxItem(eMenu, "EInterrupter"))
     {
         E.Cast(sender);
     }
 }
開發者ID:yashine59fr,項目名稱:PortAIO,代碼行數:8,代碼來源:Program.cs

示例7: RyzeInterruptableSpell

 internal static void RyzeInterruptableSpell(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     var wSpell = getCheckBoxItem(MenuManager.eventMenu, "useW2I");
     if (!wSpell || !sender.LSIsValidTarget(W.Range)) return;
     W.Cast(sender);
 }
開發者ID:yashine59fr,項目名稱:PortAIO,代碼行數:6,代碼來源:Champion.cs

示例8: Interrupter2_OnInterruptableTarget

 private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender,
     Interrupter2.InterruptableTargetEventArgs args)
 {
     if (!getCheckBoxItem(rMenu, "OPTI"))
         return;
     if (R.IsReady() && sender.LSDistance(BallPos) < R.Range)
     {
         R.Cast();
         Program.debug("interupt");
     }
     else if (Q.IsReady() && Player.Mana > RMANA + QMANA && sender.LSIsValidTarget(Q.Range))
         Q.Cast(sender.ServerPosition);
 }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:13,代碼來源:Program.cs

示例9: OnInterruptableTarget

        private static void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (sender == null || !sender.LSIsValidTarget(Q.Range) || !sender.IsEnemy)
            {
                return;
            }

            if (sender.IsValid && args.DangerLevel == Interrupter2.DangerLevel.High && getCheckBoxItem(miscMenu, "ElZilean.Q.Interrupt"))
            {
                if (Q.IsReady() && sender.LSIsValidTarget(Q.Range))
                {
                    var prediction = Q.GetPrediction(sender);
                    if (prediction.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High)
                    {
                        Q.Cast(prediction.CastPosition);
                    }
                }
                W.Cast();
            }
        }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:20,代碼來源:Zilean.cs

示例10: Interrupter2_OnInterruptableTarget

        private void Interrupter2_OnInterruptableTarget(
            AIHeroClient sender,
            Interrupter2.InterruptableTargetEventArgs args)
        {
            if (args.DangerLevel != Interrupter2.DangerLevel.High
                || sender.LSDistance(Player) > spells[Spells.R].Range)
            {
                return;
            }

            if (sender.LSIsValidTarget(spells[Spells.R].Range) && args.DangerLevel == Interrupter2.DangerLevel.High
                && spells[Spells.R].IsReady())
            {
                spells[Spells.R].Cast(sender);
            }
        }
開發者ID:,項目名稱:,代碼行數:16,代碼來源:

示例11: CastIgnite

 public static bool CastIgnite(AIHeroClient target)
 {
     return Ignite.IsReady() && target.LSIsValidTarget(600) &&
            target.Health + 5 < myHero.GetSummonerSpellDamage(target, DamageLibrary.SummonerSpells.Ignite) &&
            myHero.Spellbook.CastSpell(Ignite, target);
 }
開發者ID:yashine59fr,項目名稱:PortAIO-1,代碼行數:6,代碼來源:Program.cs

示例12: ShouldReset

 private static bool ShouldReset(AIHeroClient hero)
 {
     try
     {
         return !hero.LSIsValidTarget(float.MaxValue, false) || hero.IsZombie ||
                hero.HasBuffOfType(BuffType.Invulnerability) || hero.IsInvulnerable;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
     return false;
 }
開發者ID:yashine59fr,項目名稱:PortAIO-1,代碼行數:13,代碼來源:IncomingDamageManager.cs

示例13: OnInterruptableTarget

 private static void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (sender == null) return;
     if (getCheckBoxItem(miscMenu, "misc.interrupt") && sender.LSIsValidTarget(Spells.E.Range) &&
         Spells.E.IsReady() && Player.HealthPercent <= sender.HealthPercent)
         Spells.E.CastOnUnit(sender);
 }
開發者ID:yashine59fr,項目名稱:PortAIO-1,代碼行數:7,代碼來源:Program.cs

示例14: Interrupter2OnOnInterruptableTarget

        /// <summary>
        ///     Interrupts an interruptable target.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="Interrupter2.InterruptableTargetEventArgs" /> instance containing the event data.</param>
        private void Interrupter2OnOnInterruptableTarget(
            AIHeroClient sender,
            Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!miscMenu["UseEInterrupt"].Cast<CheckBox>().CurrentValue || !this.E.IsReady() || !sender.LSIsValidTarget(this.E.Range))
            {
                return;
            }

            if (args.DangerLevel == Interrupter2.DangerLevel.Medium || args.DangerLevel == Interrupter2.DangerLevel.High)
            {
                this.E.Cast(sender);
            }
        }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:19,代碼來源:MoonDraven.cs

示例15: OnInterruptableTarget

        private static void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (sender.IsAlly || sender.IsMe)
            {
                return;
            }

            if (args.DangerLevel != Interrupter2.DangerLevel.High || sender.LSDistance(Player) > W.Range)
            {
                return;
            }

            if (sender.LSIsValidTarget(Q.Range) && Q.IsReady() && getCheckBoxItem(interrupterMenu, "ElAlistar.Interrupter.Q"))
            {
                Q.Cast();
            }

            if (sender.LSIsValidTarget(W.Range) && W.IsReady() &&
                getCheckBoxItem(interrupterMenu, "ElAlistar.Interrupter.W"))
            {
                W.Cast(sender);
            }
        }
開發者ID:yashine59fr,項目名稱:PortAIO,代碼行數:23,代碼來源:Program.cs


注:本文中的AIHeroClient.LSIsValidTarget方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。