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


C# Hero.GetStackDamage方法代码示例

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


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

示例1: Execute

        /// <summary>
        ///     The execute.
        /// </summary>
        /// <param name="hero">
        ///     The hero.
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        public bool Execute(Hero hero)
        {
            var fs = Variables.ForceStaff;
            if (!fs.CanHit(hero) || !Utils.SleepCheck(hero.ClassID + "Techies.AutoDetonate"))
            {
                return false;
            }

            double rotSpeed;
            if (Prediction.RotSpeedDictionary.TryGetValue(hero.Handle, out rotSpeed) && rotSpeed > 0
                && Variables.Menu.ForceStaffMenu.Item("checkRotating").GetValue<bool>())
            {
                return false;
            }

            if (Prediction.StraightTime(hero) / 1000
                < Variables.Menu.ForceStaffMenu.Item("straightTime").GetValue<Slider>().Value)
            {
                return false;
            }

            var tempDamage = hero.GetStackDamage(610);
            if (tempDamage.Item1 >= hero.Health)
            {
                fs.UseAbility(hero);
                Utils.Sleep(250, "Techies.ForceStaff");
                return true;
            }

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

示例2: Execute

        /// <summary>
        ///     The execute.
        /// </summary>
        /// <param name="hero">
        ///     The hero.
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        public bool Execute(Hero hero)
        {
            if (Variables.Instance.Techies.EnabledHeroes.ContainsKey(hero.ClassID)
                && !Variables.Instance.Techies.EnabledHeroes[hero.ClassID])
            {
                return false;
            }

            if (Utils.SleepCheck(hero.ClassID + "Techies.AutoDetonate"))
            {
                var tempDamage = hero.GetStackDamage();
                if (tempDamage.Item1 >= hero.Health)
                {
                    Detonate(tempDamage.Item2);
                    Utils.Sleep(500, hero.ClassID + "Techies.AutoDetonate");
                    return true;
                }
            }

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

示例3: Execute

        /// <summary>
        ///     The execute.
        /// </summary>
        /// <param name="hero">
        ///     The hero.
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        public bool Execute(Hero hero)
        {
            if ((Variables.Instance.Techies.EnabledHeroes.ContainsKey(hero.ClassID)
                 && !Variables.Instance.Techies.EnabledHeroes[hero.ClassID]) || hero.IsInvul() || hero.IsMagicImmune()
                || hero.HasModifiers(
                    new[]
                        {
                            "modifier_juggernaut_blade_fury",
                            "modifier_ember_spirit_sleight_of_fist_caster_invulnerability"
                        },
                    false) || !hero.CanDie())
            {
                return false;
            }

            if (!Utils.SleepCheck(hero.ClassID + "Techies.AutoDetonate"))
            {
                return false;
            }

            var tempDamage = hero.GetStackDamage();
            if (!(tempDamage.Item1 >= hero.Health))
            {
                return false;
            }

            if (tempDamage.Item3 != null && tempDamage.Item3.AutoDetonate)
            {
                Detonate(tempDamage.Item2);
                Utils.Sleep(500, hero.ClassID + "Techies.AutoDetonate");
                return true;
            }

            if (tempDamage.Item3 == null || tempDamage.Item3.AutoDetonate
                || !Variables.Menu.DrawingsMenu.Item("Techies.ShowNotification").GetValue<bool>())
            {
                return false;
            }

            if (!Utils.SleepCheck("Techies.Notification." + hero.StoredName()))
            {
                return false;
            }

            Utils.Sleep(15000, "Techies.Notification." + hero.StoredName());
            if (this.notification == null)
            {
                this.notification = new Notification(
                    5000,
                    new Vector2(HUDInfo.ScreenSizeX(), (float)(HUDInfo.ScreenSizeY() / 2.3)),
                    new Vector2(HUDInfo.ScreenSizeX() / 8, HUDInfo.ScreenSizeX() / 30));
            }

            this.notification.RemoteMines = tempDamage.Item2;
            this.notification.PopUp(hero);
            return false;
        }
开发者ID:spyware293,项目名称:Ensage,代码行数:66,代码来源:AutoDetonateHeroes.cs


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