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


C# Ability.CastSkillShot方法代码示例

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


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

示例1: Cast

 public static bool Cast(Ability ability, Unit target, string name)
 {
     if (name == "razor_static_link" && target.Distance2D(AbilityMain.Me) > (ability.GetCastRange(name) * 0.75))
     {
         return false;
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.UnitTarget, name))
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         SoulRing.Cast(ability);
         ability.UseAbility(target);
         return true;
     }
     if ((ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect, name)
          || ability.IsAbilityBehavior(AbilityBehavior.Point, name))
         && (Prediction.StraightTime(target) > 1000 || target.MovementSpeed < 200))
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         return ability.CastSkillShot(target, name, SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         SoulRing.Cast(ability);
         ability.UseAbility();
         return true;
     }
     return false;
 }
开发者ID:dendimonster,项目名称:EnsageSharp,代码行数:32,代码来源:Special.cs

示例2: Cast

        public static bool Cast(Ability ability, Unit target, string name)
        {
            if (name == "pudge_rot" && Utils.SleepCheck("rotToggle"))
            {
                if (!ability.IsToggled)
                {
                    ability.ToggleAbility();
                    Utils.Sleep(500, "rotToggle");
                    return true;
                }

                return false;
            }

            if (name == "templar_assassin_psionic_trap")
            {
                var modifier = target.FindModifier("modifier_templar_assassin_trap_slow");
                if (modifier != null && modifier.RemainingTime > ability.GetHitDelay(target, name))
                {
                    return false;
                }

                if (TemplarAssasinUseTrap(target))
                {
                    return false;
                }

                var casted = ability.CastSkillShot(target, MyHeroInfo.Position, name);
                if (casted)
                {
                    DelayAction.Add(
                        new DelayActionItem(
                            (int)ability.GetHitDelay(target, name) * 1000 + 700, 
                            delegate { TemplarAssasinUseTrap(target); }, 
                            CancellationToken.None));
                }

                return casted;
            }

            return ability.CastStun(
                target, 
                1, 
                abilityName: name, 
                soulRing: SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
        }
开发者ID:Ray0fHope,项目名称:EnsageSharp,代码行数:46,代码来源:Slow.cs

示例3: LetsTryCastSpell

        private static void LetsTryCastSpell(Hero me, Hero target, Ability spellForCast, bool nextSpell=false)
        {
            var ss = me.FindSpell("invoker_sun_strike");
            var icewall = me.FindSpell("invoker_ice_wall");
            var blast = me.FindSpell("invoker_deafening_blast");
            var tornado = me.FindSpell("invoker_tornado");
            var emp = me.FindSpell("invoker_emp");
            /*
            var coldsnap = me.FindSpell("invoker_cold_snap");
            var ghostwalk = me.FindSpell("invoker_ghost_walk");
            
            var forge = me.FindSpell("invoker_forge_spirit");
            var emp = me.FindSpell("invoker_emp");
            var alacrity = me.FindSpell("invoker_alacrity");
            */
            var meteor = me.FindSpell("invoker_chaos_meteor");
            var eulmodif = target.Modifiers.FirstOrDefault(x => x.Name == "modifier_eul_cyclone" || x.Name == "modifier_invoker_tornado");
            /*foreach (var source in target.Modifiers.ToList())
            {
                PrintInfo(source.Name+": "+source.RemainingTime);
            }*/
            var timing = Equals(spellForCast, ss)
                ? 1.7
                : Equals(spellForCast, meteor)
                    ? 1.3
                    : Equals(spellForCast, blast)
                        ? me.Distance2D(target)/1100 + Game.Ping/1000
                        : (Equals(spellForCast, icewall))
                            ? 2.5
                            : Equals(spellForCast, emp) ? 2.9 : 0;

            if (eulmodif!=null && eulmodif.RemainingTime<=timing)
            {
                if (icewall != null && Equals(spellForCast, icewall))
                {
                    CastIceWall(me, target, me.Distance2D(target) <= 250,icewall);
                }
                else
                {
                    UseSpell(spellForCast, target,me);
                    //Game.PrintMessage(spellForCast.Name+" (2)", MessageType.ChatMessage);
                    //PrintInfo("caster "+spellForCast.Name+" with timing "+timing);
                    Utils.Sleep(250, "StageCheck");
                    _stage++;
                }
            }
            else if (eulmodif == null /*&& !Equals(spellForCast, ss)*/)
            {
                if (icewall != null && Equals(spellForCast, icewall))
                {
                    CastIceWall(me, target, me.Distance2D(target) <= 300, icewall);
                }
                else
                {
                    var time = 250f;
                    if (Equals(spellForCast, tornado))
                    {
                        if (nextSpell) time += me.Distance2D(target)/spellForCast.GetProjectileSpeed()*1000 + Game.Ping;

                        spellForCast.CastSkillShot(target, me.Position,spellForCast.Name);
                        //Game.PrintMessage("CastSkillShot "+spellForCast.CastSkillShot(target, me.Position,spellForCast.Name),MessageType.ChatMessage);
                    }
                    else
                    {
                        //Game.PrintMessage("suka: " + spellForCast.Name,MessageType.ChatMessage);
                        UseSpell(spellForCast, target,me);
                    }
                    Utils.Sleep(time, "StageCheck");
                    _stage++;
                }
            }
        }
开发者ID:dendimonster,项目名称:EnsageSharp-1,代码行数:72,代码来源:Program.cs

示例4: Cast

 public static bool Cast(Ability ability, Unit target, string name)
 {
     if (target.Modifiers.Any(x => x.Name == "modifier_item_blade_mail_reflect")
         && AbilityDamage.CalculateDamage(ability, AbilityMain.Me, target) > AbilityMain.Me.Health)
     {
         return false;
     }
     if (target.Modifiers.Any(x => x.Name == "modifier_nyx_assassin_spiked_carapace"))
     {
         return false;
     }
     if (ability.Name == "sniper_assassinate")
     {
         if (AbilityMain.Me.Distance2D(target) <= AbilityMain.Me.GetAttackRange() + 100)
         {
             return false;
         }
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.UnitTarget, name) && ability.Name != "lion_impale")
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         SoulRing.Cast(ability);
         if (name == "omniknight_purification")
         {
             ability.UseAbility(AbilityMain.Me);
         }
         ability.UseAbility(target);
         return true;
     }
     if ((ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect, name)
          || ability.IsAbilityBehavior(AbilityBehavior.Point, name))
         && (Prediction.StraightTime(target) > 1000 || target.MovementSpeed < 200))
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         return ability.CastSkillShot(target, name, SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
     {
         if (ability.Name == "templar_assassin_meld")
         {
             if (
                 !(target.Distance2D(MyHeroInfo.Position)
                   < (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius))
                 || Orbwalking.AttackOnCooldown(target) || AbilityMain.Me.IsAttacking()
                 || (target.Predict(Game.Ping).Distance2D(MyHeroInfo.Position)
                     > (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius))
                 || !Utils.SleepCheck("GlobalCasting"))
             {
                 return false;
             }
             Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
             ManageAutoAttack.AutoAttackDisabled = true;
             ability.UseAbility();
             DelayAction.Add(
                 new DelayActionItem(
                     (int)ability.GetCastDelay(AbilityMain.Me, target)*1000,
                     () =>
                         {
                             AbilityMain.Me.Attack(target);
                         },
                     CancellationToken.None));
             Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000, "GlobalCasting");
             Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "casting");
             Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "Ability.Move");
             return true;
         }
         if (ability.Name.Contains("nevermore_shadowraze"))
         {
             Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
             ManageAutoAttack.AutoAttackDisabled = true;
             return ability.CastSkillShot(target, name);
         }
         SoulRing.Cast(ability);
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         ability.UseAbility();
         return true;
     }
     return false;
 }
开发者ID:dendimonster,项目名称:EnsageSharp,代码行数:82,代码来源:Nuke.cs

示例5: Combo


//.........这里部分代码省略.........
                            && me.CanCast() &&
                            !linkens &&
                            !target.IsMagicImmune() &&
                            Utils.SleepCheck("ethereal")
                            )
                        {
                            ethereal.UseAbility(target);
                            Utils.Sleep(150, "ethereal");
                        }

                        if ((vail == null || !vail.CanBeCasted() || !menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name)) && (ethereal == null || !ethereal.CanBeCasted() || !menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name)))
                        {
                            if ( // sheep
                                sheep != null
                                && sheep.CanBeCasted()
                                && me.CanCast()
                                && !target.IsLinkensProtected()
                                && !target.IsMagicImmune()
                                && me.Distance2D(target) <= 1400
                                && !stoneModif
                                && menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(sheep.Name)
                                && Utils.SleepCheck("sheep")
                                )
                            {
                                sheep.UseAbility(target);
                                Utils.Sleep(250, "sheep");
                            } // sheep Item end
                            if (Q.CanBeCasted()
                                && me.Position.Distance2D(target.Position) < Q.CastRange - 50
                                && !target.IsMagicImmune()
                                && menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
                                && Utils.SleepCheck("Q"))
                            {
                                Q.CastSkillShot(target);
                                Utils.Sleep(90, "Q");
                            }
                            if (W.CanBeCasted()
                                && menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
                                && me.Position.Distance2D(target.Position) < 800
                                && Utils.SleepCheck("W"))
                            {
                                W.UseAbility(target);
                                Utils.Sleep(60, "W");
                            }

                            if ( // SoulRing Item
                                soulring != null &&
                                me.Health >= (me.MaximumHealth * 0.3) &&
                                me.Mana <= R.ManaCost &&
                                soulring.CanBeCasted()
                                && menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(soulring.Name))
                            {
                                soulring.UseAbility();
                            } // SoulRing Item end

                            if ( // Arcane Boots Item
                                arcane != null &&
                                me.Mana <= Q.ManaCost &&
                                arcane.CanBeCasted()
                                && menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(arcane.Name))
                            {
                                arcane.UseAbility();
                            } // Arcane Boots Item end

                            if ( // Shiva Item
                                shiva != null &&
开发者ID:Rulfy,项目名称:ReworkAllScripts,代码行数:67,代码来源:NyxAssassinController.cs

示例6: Combo


//.........这里部分代码省略.........
                        }

                        if ((vail == null || !vail.CanBeCasted() || !Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name)) && (ethereal == null || !ethereal.CanBeCasted() || !Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name)))
                        {
                            if ( // sheep
                                sheep != null
                                && sheep.CanBeCasted()
                                && me.CanCast()
                                && !e.IsLinkensProtected()
                                && !e.IsMagicImmune()
                                && !e.IsStunned()
                                && !e.IsHexed()
                                && me.Distance2D(e) <= 1400
                                && !stoneModif
                                && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(sheep.Name)
                                && Utils.SleepCheck("sheep")
                                )
                            {
                                sheep.UseAbility(e);
                                Utils.Sleep(250, "sheep");
                            } // sheep Item end
                            if (
                                Q!=null
                                && Q.CanBeCasted()
                                && Q.Cooldown<=0
                                && me.Mana>= Q.ManaCost
                                && !e.IsStunned()
                                && !e.IsHexed()
                                && me.Distance2D(e) <= Q.GetCastRange() +me.HullRadius
                                && !e.IsMagicImmune()
                                && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
                                && Utils.SleepCheck("Q"))
                            {
                                Q.CastSkillShot(e);
                                Utils.Sleep(100, "Q");
                            }
                            if (
                                W != null
                                && W.CanBeCasted()
                                && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
                                && e.Mana >= (e.MaximumMana * 0.2)
                                && me.Position.Distance2D(e.Position) < W.GetCastRange()
                                && Utils.SleepCheck("W"))
                            {
                                W.UseAbility(e);
                                Utils.Sleep(100, "W");
                            }

                            if ( // SoulRing Item
                                soul != null &&
                                me.Health >= (me.MaximumHealth * 0.5) &&
                                me.Mana <= R.ManaCost &&
                                soul.CanBeCasted()
                                && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(soul.Name)
                                && Utils.SleepCheck("soul"))
                            {
                                soul.UseAbility();
                                Utils.Sleep(100, "soul");
                            } // SoulRing Item end

                            if ( // Arcane Boots Item
                                arcane != null &&
                                me.Mana <= Q.ManaCost &&
                                arcane.CanBeCasted()
                                && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(arcane.Name)
                                && Utils.SleepCheck("arcane"))
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:67,代码来源:NyxAssassinController.cs

示例7: Game_OnUpdate


//.........这里部分代码省略.........
                                && Utils.SleepCheck("Rem"))
                            {
                                D.UseAbility(Prediction.InFront(me, 50));
                                Utils.Sleep(600, "Rem");
                            }
                        }
                        if (
                            me.Distance2D(r) >= 210
                            && remnant.Count(x => x.Distance2D(me) <= 350) >= 1
                            && Q.CanBeCasted()
                            && Utils.SleepCheck("RemMove"))
                        {
                            me.Move(r.Position);
                            Utils.Sleep(250, "RemMove");
                        }
                        else
                        {
                            if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900)
                            {
                                Orbwalking.Orbwalk(e, 0, 1600, true, true);
                            }
                        }
                        if (//Q Skill
                            W != null
                            && (!Q.CanBeCasted()
                            || Q == null)
                            && !E.CanBeCasted()
                            && W.CanBeCasted()
                            && me.Distance2D(e) <= E.GetCastRange() - 50
                            && me.CanCast()
                            && Utils.SleepCheck(me.Handle + "remnantW")
                            )
                        {
                            W.CastSkillShot(e);
                            Utils.Sleep(250, me.Handle + "remnantW");
                        }
                        if (//Q Skill
                           Q != null
                           && Q.CanBeCasted()
                           && me.CanCast()
                           && me.Distance2D(e) <= E.GetCastRange() - 50
                           && me.Distance2D(r) <= 210
                           && Utils.SleepCheck(r.Handle + "remnantQ")
                           )
                        {
                            Q.CastSkillShot(e);
                            Utils.Sleep(250, r.Handle + "remnantQ");
                        }
                        else
                        if (//W Skill
                           W != null
                           && W.CanBeCasted()
                           && !Q.CanBeCasted()
                           && me.Distance2D(e) <= E.GetCastRange()
                           && Utils.SleepCheck(me.Handle + "remnantW")
                           )
                        {
                            W.CastSkillShot(e);
                            Utils.Sleep(250, me.Handle + "remnantW");
                        }
                        if (r != null
                           && E != null
                           && E.CanBeCasted()
                           && me.CanCast()
                           && me.Distance2D(r) < E.GetCastRange()
                           && me.Distance2D(e) <= E.GetCastRange()
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:67,代码来源:Program.cs

示例8: Others


//.........这里部分代码省略.........
                            if (me.Distance2D(e) <= E.GetCastRange() - 50
                                && Utils.SleepCheck("Rem"))
                            {
                                D.UseAbility(Prediction.InFront(me, 50));
                                Utils.Sleep(600, "Rem");
                            }
                        }
                        if (
                           me.Distance2D(r) >= 200
                           && me.Distance2D(r) <= 350
                           && Q.CanBeCasted()
                           && Utils.SleepCheck("RemMove"))
                        {
                            me.Move(r.Position);
                            Utils.Sleep(300, "RemMove");
                        }
                        else
                        {
                            if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900)
                            {
                                Orbwalking.Orbwalk(e, 0, 1600, true, true);
                            }
                        }
                        if (//Q Skill
                          r != null
                          && Q != null
                          && Q.CanBeCasted()
                          && me.CanCast()
                          && me.Distance2D(e) <= E.GetCastRange() - 50
                          && r.Distance2D(me) <= 210
                          && Utils.SleepCheck(r.Handle + "remnantQ")
                          )
                        {
                            Q.CastSkillShot(e);
                            Utils.Sleep(250, r.Handle + "remnantQ");
                        }
                    }
                }
            }
            if (CastW)
            {
                Wmod = me.HasModifier("modifier_earth_spirit_rolling_boulder_caster");
                Task.Delay(350).ContinueWith(_ =>
                {
                    if (remnant.Count(x => x.Distance2D(me) <= 1200) == 0)
                    {
                        if (
                            D.CanBeCasted()
                            && Wmod
                            && me.Distance2D(e) >= 600
                            && Utils.SleepCheck("nextAction")
                            )
                        {
                            D.UseAbility(Prediction.InFront(me, 170));
                            Utils.Sleep(1800 + D.FindCastPoint(), "nextAction");
                        }
                    }
                });
                if (//W Skill
                    W != null
                    && W.CanBeCasted()
                    && Game.MousePosition.Distance2D(e) <= 700
                    && me.Distance2D(e) <= W.GetCastRange() - 200
                    && Utils.SleepCheck(me.Handle + "remnantW")
                    )
                {
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:67,代码来源:Program.cs

示例9: Combo


//.........这里部分代码省略.........
                            && ((blink == null
                            || !blink.CanBeCasted()
                            || !menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name))
                            || (blink != null && me.Distance2D(e) <= 350 && blink.CanBeCasted()))
                            )
                        {
                            if (me.Distance2D(e) <= E.CastRange - 50
                                && Utils.SleepCheck("Rem"))
                            {
                                D.UseAbility(Prediction.InFront(me, 50));
                                Utils.Sleep(600, "Rem");
                            }
                        }
                        if (
                            me.Distance2D(r) >= 1500
                            && me.Distance2D(r) <= 350
                            && Q.CanBeCasted()
                            && Utils.SleepCheck("RemMove"))
                        {
                            me.Move(r.Position);
                            Utils.Sleep(250, "RemMove");
                        }
                        if (//Q Skill
                            W != null
                            && (!Q.CanBeCasted()
                            || Q == null)
                            && !E.CanBeCasted()
                            && W.CanBeCasted()
                            && me.Distance2D(e) <= E.CastRange - 50
                            && me.CanCast()
                            && Utils.SleepCheck(me.Handle + "remnantW")
                            )
                        {
                            W.CastSkillShot(e);
                            Utils.Sleep(250, me.Handle + "remnantW");
                        }
                        if (//Q Skill
                           Q != null
                           && Q.CanBeCasted()
                           && me.CanCast()
                           && me.Distance2D(e) <= E.CastRange - 50
                           && me.Distance2D(r) <= 210
                           && Utils.SleepCheck(r.Handle + "remnantQ")
                           )
                        {
                            Q.CastSkillShot(e);
                            Utils.Sleep(250, r.Handle + "remnantQ");
                        }
                        else
                        if (//W Skill
                           W != null
                           && W.CanBeCasted()
                           && !Q.CanBeCasted()
                           && me.Distance2D(e) <= E.CastRange
                           && Utils.SleepCheck(me.Handle + "remnantW")
                           )
                        {
                            W.CastSkillShot(e);
                            Utils.Sleep(250, me.Handle + "remnantW");
                        }
                        if (r != null
                           && E != null
                           && E.CanBeCasted()
                           && me.CanCast()
                           && me.Distance2D(r) < E.CastRange
                           && me.Distance2D(e) <= E.CastRange
开发者ID:Rulfy,项目名称:ReworkAllScripts,代码行数:67,代码来源:EarthSpiritController.cs

示例10: Cast

        public static bool Cast(Ability ability, Unit target, string name)
        {
            if (name == "razor_static_link" && target.Distance2D(AbilityMain.Me) > (ability.GetCastRange(name) * 0.75))
            {
                return false;
            }

            if (ability.IsAbilityBehavior(AbilityBehavior.UnitTarget, name))
            {
                Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
                ManageAutoAttack.AutoAttackDisabled = true;
                SoulRing.Cast(ability);
                ability.UseAbility(target);
                return true;
            }

            if ((ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect, name)
                 || ability.IsAbilityBehavior(AbilityBehavior.Point, name))
                && (Prediction.StraightTime(target) > 1000 || target.MovementSpeed < 200))
            {
                Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
                ManageAutoAttack.AutoAttackDisabled = true;
                if (ability.ClassID == ClassID.CDOTA_Item_SentryWard)
                {
                    var sentry =
                        ObjectMgr.GetEntities<Entity>()
                            .FirstOrDefault(
                                x =>
                                x.ClassID == ClassID.CDOTA_NPC_Observer_Ward_TrueSight && x.Distance2D(target) < 700);
                    if (sentry != null)
                    {
                        return false;
                    }

                    var tower = EnemyTowers.Towers.FirstOrDefault(x => x.Distance2D(target) < 800);
                    if (tower != null)
                    {
                        return false;
                    }
                }

                var casted = ability.CastSkillShot(target, name, SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
                if (casted)
                {
                    if (ability.ClassID == ClassID.CDOTA_Item_SentryWard)
                    {
                        Utils.Sleep(20000, ability.Handle.ToString());
                    }

                    return true;
                }

                return false;
            }

            if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
            {
                Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
                ManageAutoAttack.AutoAttackDisabled = true;
                SoulRing.Cast(ability);
                ability.UseAbility();
                return true;
            }

            return false;
        }
开发者ID:Ray0fHope,项目名称:EnsageSharp,代码行数:66,代码来源:Special.cs


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