当前位置: 首页>>代码示例>>C#>>正文


C# AIHeroClient.HasBuffOfType方法代码示例

本文整理汇总了C#中AIHeroClient.HasBuffOfType方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.HasBuffOfType方法的具体用法?C# AIHeroClient.HasBuffOfType怎么用?C# AIHeroClient.HasBuffOfType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.HasBuffOfType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CanStun

        public static bool CanStun(AIHeroClient unit, bool ECheck = false)
        {
            if (unit.HasBuffOfType(BuffType.SpellImmunity) || unit.HasBuffOfType(BuffType.SpellShield) || Player.Instance.IsDashing()) return false;
            if (ECheck && !E.IsReady()) return false;

            var prediction = Prediction.Position.PredictUnitPosition(unit, 400);
            var predictionsList = new List<Vector3>
                        {
                            unit.ServerPosition,
                            unit.Position,
                            prediction.To3D(),
                        };

            var wallsFound = 0;
            foreach (var position in predictionsList)
            {
                for (var i = 0; i < 300; i += (int) unit.BoundingRadius)
                {
                    var cPos = Player.Instance.Position.Extend(position, Player.Instance.Distance(position) + i).To3D();
                    if (cPos.IsWall())
                    {
                        wallsFound++;
                        break;
                    }
                }
            }
            if ((wallsFound / predictionsList.Count) >= Settings.MiscSettings.StunPercent / 100f)
            {
                return true;
            }

            return false;
        }
开发者ID:alvothefirst,项目名称:EloBuddy,代码行数:33,代码来源:SpellLib.cs

示例2: IsCondemable

        public static bool IsCondemable(AIHeroClient unit, Vector2 pos = new Vector2())
        {
            if (unit.HasBuffOfType(BuffType.SpellImmunity) || unit.HasBuffOfType(BuffType.SpellShield) || LastCheck + 50 > Environment.TickCount || Variables._Player.IsDashing()) return false;
            var prediction = SpellManager.E2.GetPrediction(unit);
            var predictionsList = pos.IsValid() ? new List<Vector3>() { pos.To3D() } : new List<Vector3>
                        {
                            unit.ServerPosition,
                            unit.Position,
                            prediction.CastPosition,
                            prediction.UnitPosition
                        };

            var wallsFound = 0;
            Points = new List<Vector2>();
            foreach (var position in predictionsList)
            {
                for (var i = 0; i < MenuManager.CondemnPushDistance; i += (int)unit.BoundingRadius)
                {
                    var cPos = ObjectManager.Player.Position.Extend(position, ObjectManager.Player.Distance(position) + i).To3D();
                    Points.Add(cPos.To2D());
                    if (NavMesh.GetCollisionFlags(cPos).HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(cPos).HasFlag(CollisionFlags.Building))
                    {
                        wallsFound++;
                        break;
                    }
                }
            }
            if ((wallsFound / predictionsList.Count) >= 33 / 100f)
            {
                return true;
            }
            return false;
        }
开发者ID:Kysamaa,项目名称:EloBuddy,代码行数:33,代码来源:Condemn.cs

示例3: IsCondemnable

        public static bool IsCondemnable(AIHeroClient target)
        {
            if (Misc.IsChecked(MiscMenu, "dnCondemn" + target.ChampionName.ToLower()))
            {
                return false;
            }

            if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || _Player.IsDashing()) return false;

            var predPos = Prediction.Position.PredictUnitPosition(target, 500);

            var position = _Player.Position.Extend(target.Position, _Player.Distance(target) - Misc.GetSliderValue(MiscMenu, "condenmErrorMargin")).To3D();
            var predictPos = _Player.Position.Extend(predPos, _Player.Distance(predPos) - Misc.GetSliderValue(MiscMenu, "condenmErrorMargin")).To3D();
            for (var i = 0; i < 470 - Misc.GetSliderValue(MiscMenu, "condenmErrorMargin"); i += 10)
            {
                var cPos = _Player.Position.Extend(position, _Player.Distance(position) + i).To3D();
                var cPredPos = _Player.Position.Extend(predictPos, _Player.Distance(predictPos) + i).To3D();

                if ((cPredPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPredPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building)) && (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building)))
                {
                    return true;
                }
            }
            return false;
        }
开发者ID:swanton2,项目名称:Elobuddy,代码行数:25,代码来源:Vayne.cs

示例4: IsSpellShielded

 /// <summary>
 ///     Gets a value indicating whether the target has protection or not.
 /// </summary>
 public static bool IsSpellShielded(AIHeroClient unit)
 {
     return unit.IsInvulnerable ||
            unit.HasBuffOfType(BuffType.SpellShield) ||
            unit.HasBuffOfType(BuffType.SpellImmunity) ||
            Utils.TickCount - unit.LastCastedSpellT() < 300 &&
            (
                unit.LastCastedSpellName().Equals("SivirE", StringComparison.InvariantCultureIgnoreCase) ||
                unit.LastCastedSpellName().Equals("BlackShield", StringComparison.InvariantCultureIgnoreCase) ||
                unit.LastCastedSpellName().Equals("NocturneShit", StringComparison.InvariantCultureIgnoreCase)
                );
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:15,代码来源:Bools.cs

示例5: IsUltable

        public static bool IsUltable(AIHeroClient target)
        {
            if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || _Player.IsDashing()) return false;

            var posicao = Program._Player.Position.Extend(target.Position, Program._Player.Distance(target) - getSliderValue(Program.ComboMenu, "useRComboSlider")).To3D();
            for (int i = 0; i < 480 - getSliderValue(Program.ComboMenu, "useRComboSlider"); i += 10)
            {
                var cPos = _Player.Position.Extend(posicao, _Player.Distance(posicao) + i).To3D();
                if (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building))
                {
                    return true;
                }
            }
            return false;
        }
开发者ID:Cloudhax23,项目名称:EloBuddy,代码行数:15,代码来源:Ult.cs

示例6: ShouldCleanse

 /// <summary>
 ///     Gets a value indicating whether BuffType is worth cleansing.
 /// </summary>
 public static bool ShouldCleanse(AIHeroClient target)
 {
     return !Invulnerable.Check(target) &&
         GameObjects.EnemyHeroes.Any(t => t.LSIsValidTarget(1500f)) &&
         (
            IsValidStun() ||
            IsValidSnare() ||
            target.HasBuffOfType(BuffType.Flee) ||
            target.HasBuffOfType(BuffType.Charm) ||
            target.HasBuffOfType(BuffType.Taunt) ||
            target.HasBuffOfType(BuffType.Polymorph) ||
            GameObjects.Player.HasBuff("ThreshQ") ||
            GameObjects.Player.HasBuff("SummonerDot")
         );
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:18,代码来源:Bools.cs

示例7: IsCondenavel

        public static bool IsCondenavel(AIHeroClient target)
        {
            if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || Program._Player.IsDashing()) return false;

            var posicao = Program._Player.Position.Extend(target.Position, Program._Player.Distance(target) - 20).To3D();
            for (int i = 0; i < 470 - 20; i += 10)
            {
                var cPos = Program._Player.Position.Extend(posicao, Program._Player.Distance(posicao) + i).To3D();
                if (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building))
                {
                    return true;
                }
            }
            return false;
        }
开发者ID:VnHarry,项目名称:EloBuddy,代码行数:15,代码来源:Vayne.cs

示例8: HasSpellShield

 public static bool HasSpellShield(AIHeroClient target)
 {
     if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "bansheesveil"))
     {
         return true;
     }
     if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "SivirE"))
     {
         return true;
     }
     if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "NocturneW"))
     {
         return true;
     }
     return target.HasBuffOfType(BuffType.SpellShield) || target.HasBuffOfType(BuffType.SpellImmunity);
 }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:16,代码来源:Event.cs

示例9: Check

 public static bool Check(AIHeroClient target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     try
     {
         if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
         {
             return true;
         }
         foreach (var invulnerable in Items)
         {
             if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
             {
                 if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
                 {
                     if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                     {
                         return true;
                     }
                     if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
                     {
                         return true;
                     }
                 }
             }
         }
         return false;
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
     return false;
 }
开发者ID:FireBuddy,项目名称:zilean,代码行数:33,代码来源:Invulnerable.cs

示例10: RCast

        public static void RCast(AIHeroClient target)
        {
            if (target.HasBuffOfType(BuffType.Invulnerability)) return;
            if (!Spells.R.IsReady() || !target.IsValidTarget(Spells.R.Range)) return;
            if (DamageLib.RDamage(target) < target.Health) return;

            Spells.R.Cast(target);
        }
开发者ID:HeheheM,项目名称:EloBuddy-1,代码行数:8,代码来源:Casts.cs

示例11: CC

 static bool CC(AIHeroClient unit)
 {
     return unit.HasBuffOfType(BuffType.Charm) || unit.HasBuffOfType(BuffType.Fear)
         || unit.HasBuffOfType(BuffType.Snare)
         || unit.HasBuffOfType(BuffType.Taunt) || unit.HasBuffOfType(BuffType.Stun)
         || unit.HasBuffOfType(BuffType.Knockup) || unit.HasBuffOfType(BuffType.Suppression);
 }
开发者ID:SuperNova911,项目名称:Dev,代码行数:7,代码来源:Blitzcrank.cs

示例12: NormalMode

 public void NormalMode(EkkoCore core, AIHeroClient target, bool useQ, bool useE, bool useW)
 {
     if (useQ && (core.Player.Distance(target) > core.spells.E.Range || core.Player.Distance(target) <= 100 && (core.spells.E.IsReady()) && useE))
     {
         var predQ = core.spells.Q.GetPrediction(target);
         if (predQ.HitChance >= HitChance.High)
         {
             core.spells.Q.Cast(predQ.CastPosition);
         }
     }
     if (useE && core.Player.Distance(target) > core.spells.E.Range * 2)
     {
         this.CastE(target, core,useQ);
     }
        if (useW  && core.spells.W.IsInRange(target) && (target.HasBuffOfType(BuffType.Slow) ||target.HasBuffOfType(BuffType.Stun) ))
     {
         core.spells.W.Cast(target.Position);
     }
 }
开发者ID:Teamkonohabuddy,项目名称:Elobbudy,代码行数:19,代码来源:Combo.cs

示例13: IsEnemyImmobile

 /// <summary>
 ///     Enemy Immobile
 /// </summary>
 /// <param name="target"></param>
 /// <returns></returns>
 public static bool IsEnemyImmobile(AIHeroClient target)
 {
     if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) ||
         target.HasBuffOfType(BuffType.Knockup) ||
         target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) ||
         target.HasBuffOfType(BuffType.Knockback) ||
         target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Suppression) ||
         target.IsStunned || target.IsChannelingImportantSpell())
     {
         return true;
     }
     return false;
 }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:18,代码来源:Helper.cs

示例14: IsCondemnable

        public static bool IsCondemnable(AIHeroClient target)
        {
            if (isChecked(Vayne.CondemnMenu, "dnCondemn" + target.ChampionName.ToLower()))
            {
                return false;
            }

            if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || _Player.IsDashing()) return false;

            var position = Vayne._Player.Position.Extend(target.Position, Vayne._Player.Distance(target) - getSliderValue(Vayne.CondemnMenu, "condenmErrorMargin")).To3D();
            for (int i = 0; i < 470 - getSliderValue(Vayne.CondemnMenu, "condenmErrorMargin"); i += 10)
            {
                var cPos = _Player.Position.Extend(position, _Player.Distance(position) + i).To3D();
                if (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building))
                {
                    return true;
                }
            }
            return false;
        }
开发者ID:hishamriven,项目名称:so-plz,代码行数:20,代码来源:Misc.cs

示例15: Immobilize

 public static bool Immobilize(AIHeroClient target)
 {
     if (target.HasBuffOfType(BuffType.Stun)
      || target.HasBuffOfType(BuffType.Snare)
      || target.HasBuffOfType(BuffType.Knockup)
      || target.HasBuffOfType(BuffType.Charm)
      || target.HasBuffOfType(BuffType.Fear)
      || target.HasBuffOfType(BuffType.Knockback)
      || target.HasBuffOfType(BuffType.Taunt)
      || target.HasBuffOfType(BuffType.Suppression)
      || target.IsStunned
      && !target.IsRecalling())
     {
         return true;
     }
     else
     {
         return false;
     }
 }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:20,代码来源:Event.cs


注:本文中的AIHeroClient.HasBuffOfType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。