• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AttackableUnitDamageEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AttackableUnitDamageEventArgs的典型用法代码示例。如果您正苦于以下问题:C# AttackableUnitDamageEventArgs类的具体用法?C# AttackableUnitDamageEventArgs怎么用?C# AttackableUnitDamageEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AttackableUnitDamageEventArgs类属于命名空间,在下文中一共展示了AttackableUnitDamageEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Damage

        public static void Damage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if (!(args.Target is AIHeroClient))
            {
                return;
            }

            var caster = sender;
            var target = (AIHeroClient)args.Target;

            if ((!(caster is AIHeroClient) && !(caster is Obj_AI_Turret)) || caster == null || target == null)
            {
                return;
            }

            var Rally = Menu.UltMenu.Get<CheckBox>("Rally").CurrentValue && Spells.R.IsReady();
            var Rallyh = Menu.UltMenu.Get<Slider>("Rallyh").CurrentValue;

            if (!target.IsAlly || !target.IsMe || !caster.IsEnemy || target.IsEnemy
                || Menu.UltMenu["DontUlt" + target.BaseSkinName].Cast<CheckBox>().CurrentValue)
            {
                return;
            }

            if (!Player.Instance.IsInRange(target, Spells.R.Range))
            {
                return;
            }

            if (Rally && target.HealthPercent <= Rallyh)
            {
                Spells.R.Cast();
            }
        }
开发者ID:FireBuddy,项目名称:karthus,代码行数:34,代码来源:OnDamage.cs


示例2: OnDamage

        public static void OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if (Utils.TickCount - s_LastAATick < 300 + Game.Ping && s_CheckAA && args.SourceNetworkId == ObjectManager.Player.NetworkId)
            {
                var t = Target.Get(Program.Champion.Spells[0].Range + 50, true);
                if (s_DoAttack && Program.Champion.Spells[0].IsReady())
                {
                    if (t != null && (Program.Champion.OrbwalkingActiveMode == Program.Champion.OrbwalkingComboMode || Program.Champion.OrbwalkingActiveMode == Program.Champion.OrbwalkingHarassMode))
                    {
                        Program.Champion.Spells[0].Cast(t.ServerPosition, true);
                        ShineCommon.Orbwalking.ResetAutoAttackTimer();
                        Program.Champion.Orbwalker.ForceTarget(t);
                    }
                    else if (Program.Champion.OrbwalkingActiveMode == Program.Champion.OrbwalkingLaneClearMode)
                    {
                        var minion = MinionManager.GetMinions(400, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth).OrderBy(p => p.ServerPosition.Distance(ObjectManager.Player.ServerPosition)).FirstOrDefault();
                        if (minion != null)
                        {
                            Program.Champion.Spells[0].Cast(minion.ServerPosition, true);
                            ShineCommon.Orbwalking.ResetAutoAttackTimer();
                            Program.Champion.Orbwalker.ForceTarget(t);
                        }
                    }

                }
                else
                    SetAttack(false);

                CanCastAnimation = true;
                s_CheckAA = false;
            }
        }
开发者ID:q51251,项目名称:Shy-Riven,代码行数:32,代码来源:Animation.cs


示例3: Obj_AI_Base_OnDamage

        private static void Obj_AI_Base_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            var caster = sender as AIHeroClient;
            var target = args.Target as AIHeroClient;

            if (caster == null || target == null || sender.Distance(Player.Instance) > 1500) return;

            HitMarkPosition = args.Target.Position.WorldToScreen();
            CanDrawHitMarker = true;
            HitMarkerSound.Play();

            var hero = AkbarSpells.Spells.FirstOrDefault(x => x.Hero == Player.Instance.Hero && !caster.Spellbook.GetSpell(x.Slot).IsReady);
            if (args.Source.IsMe && hero!= null && args.Target.IsEnemy)
            {
                AkbarSound.Play();
            }
  
            if (hero != null && sender.IsVisible && !caster.Spellbook.GetSpell(SpellSlot.R).IsReady)
            {
                if (hero.Hero == Champion.JarvanIV || hero.Hero == Champion.Darius || hero.Hero == Champion.Aatrox)
                {
                    DunkSound.Play();
                }
            }
            Core.DelayAction(() => CanDrawHitMarker = false, 200);
        }
开发者ID:HeheheM,项目名称:EB,代码行数:26,代码来源:Program.cs


示例4: Volatile_OnDamage

        protected override void Volatile_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if (!sender.IsMe) return;
            _lastSpells.RemoveAll(p => Environment.TickCount - p.tick > 2000);

            if (args.Source.NetworkId != Player.NetworkId ||
                !EntityManager.Heroes.Enemies.Exists(p => p.NetworkId == args.Target.NetworkId)) return;

            if (_lastSpells.Count == 0) return;

            var sremove = new LastSpells("", 0, 0, "");
            foreach (var spell in _lastSpells)
            {

                if (VolatileMenu["debug"].Cast<CheckBox>().CurrentValue)
                    Chat.Print(spell.name +
                               " & args dmg: " + args.Damage + " & preddmg: " + spell.dmg);

                if (spell.target != args.Target.Name) continue;
                if (!Champions.Exists(p => p.Name == spell.target)) continue;

                Champions.Find(p => p.Name == spell.target)
                    .Differences.Add(Math.Abs(spell.dmg - args.Damage));
                HitCount++;
                sremove = spell;
            }
            if (_lastSpells.Contains(sremove))
                _lastSpells.Remove(sremove);
        }
开发者ID:addctionbr,项目名称:EloBuddy,代码行数:29,代码来源:CastManager.cs


示例5: OnDamage

 public static void OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (sender == null) return;
     if (args.TargetNetworkId == ObjectManager.Player.NetworkId && (sender is Obj_AI_Turret || sender is Obj_AI_Minion))
     {
             Orbwalker.ForceOrbwalkingPoint(Heroes.Player.Position.Extend(Wizard.GetFarthestMinion().Position, 500).RandomizePosition());
     }
 }
开发者ID:Hyunabstar,项目名称:Experimental,代码行数:8,代码来源:Program.cs


示例6: Player_OnDamage

        private void Player_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if(sender.IsMe || !args.Target.IsMe) return;
            if (args.Damage < DamageRecivedCount.CurrentValue) return;
            if (OnlyMoveOnCc.CurrentValue) return;
            if (args.Source is Obj_AI_Minion && IgnoreMinionDamage.CurrentValue) return;

            MoveCamera();

        }
开发者ID:coman3,项目名称:EloBuddy.Addons,代码行数:10,代码来源:AutoMoveOnDamage.cs


示例7: AiHeroClientOnOnDamage

        private static void AiHeroClientOnOnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if (!(args.Target is AIHeroClient) || !sender.IsMe)
                return;

            var enemySpawnPos = ObjectManager.Get<Obj_SpawnPoint>().First(x => x.IsEnemy).Position;
            if (args.Target.Distance(enemySpawnPos) <= 1000)
            {
                OnTargetHitInBase(args.Target as AIHeroClient, args.Damage);
            }
        }
开发者ID:DanThePman,项目名称:HumanziedBaseUlt,代码行数:11,代码来源:Debug.cs


示例8: AIHeroClient_OnDamage

        protected static void AIHeroClient_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if (!sender.IsMe || !R.IsReady() || args.Damage > 45)
                return;

            var safeNet = spell["R_Safe_Net2"].Cast<Slider>().CurrentValue;

            if (Player.HealthPercent <= safeNet)
            {
                R1.Cast();
            }
        }
开发者ID:Wesley67,项目名称:EloBuddy-Addons,代码行数:12,代码来源:Program.cs


示例9: AIHeroClient_OnDamage

 /// <summary>
 ///     OnDamage event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private static void AIHeroClient_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     LastSpells.RemoveAll(p => Environment.TickCount - p.Item2 > 2000);
     if (args.Source.NetworkId == ObjectManager.Player.NetworkId &&
         HeroManager.Enemies.Exists(p => p.NetworkId == args.Target.NetworkId))
     {
         if (LastSpells.Count != 0)
         {
             LastSpells.RemoveAt(0);
             s_HitCount++;
         }
     }
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:18,代码来源:Drawings.cs


示例10: Player_OnDamage

 private static void Player_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (sender != null)
     {
         if (sender.IsEnemy)
         {
             if (sender.Type == GameObjectType.obj_AI_Turret)
             {
                 LeaveTowerPls = true;
                 tower = (Obj_AI_Turret)sender;
             }
         }
     }
 }
开发者ID:alvothefirst,项目名称:EloBuddy,代码行数:14,代码来源:Autoplay.cs


示例11: OnDamage

 public static void OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if ((sender is Obj_AI_Minion || sender is Obj_AI_Turret) && args.TargetNetworkId == Heroes.Player.NetworkId)
     {
         if (Heroes.Player.Position.CountNearbyAllies(1000) <
             Heroes.Player.Position.CountNearbyEnemies(1000) ||
             Heroes.Player.Position.CountNearbyAllies(1000) <= 1)
         {
             Program.Orbwalker.ActiveMode = MyOrbwalker.OrbwalkingMode.None;
             Wizard.MoveBehindClosestAllyMinion();
             Utility.DelayAction.Add(2500, () => Program.Orbwalker.ActiveMode = MyOrbwalker.OrbwalkingMode.Mixed);
         }
     }
 }
开发者ID:nongnoobjung,项目名称:Experimental,代码行数:14,代码来源:HAManager.cs


示例12: Obj_AI_Base_OnDamage

 private void Obj_AI_Base_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     var t = ObjectManager.Get<Obj_AI_Hero>().FirstOrDefault(h => h.NetworkId == args.SourceNetworkId);
     var s = ObjectManager.Get<Obj_AI_Hero>().FirstOrDefault(h => h.NetworkId == args.TargetNetworkId);
     if (t != null && s != null &&
         (t.IsMe &&
          ObjectManager.Get<Obj_AI_Turret>()
              .FirstOrDefault(tw => tw.Distance(t) < 750 && tw.Distance(s) < 750 && tw.IsAlly) != null))
     {
         if (config.Item("autotauntattower", true).GetValue<bool>() && E.CanCast(s))
         {
             E.Cast(s, config.Item("packets").GetValue<bool>());
         }
     }
 }
开发者ID:JelloBeans,项目名称:LeagueSharp-1,代码行数:15,代码来源:Shen.cs


示例13: Obj_AI_Hero_OnDamage

 private static void Obj_AI_Hero_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     lock (LastSpells)
     {
         LastSpells.RemoveAll(p => Environment.TickCount - p.tick > 2000);
         if (args.SourceNetworkId == ObjectManager.Player.NetworkId && HeroManager.Enemies.Exists(p => p.NetworkId == sender.NetworkId))
         {
             if (LastSpells.Count != 0)
             {
                 LastSpells.RemoveAt(0);
                 hitCount++;
             }
         }
     }
 }
开发者ID:ShineSharp,项目名称:LeagueSharp,代码行数:15,代码来源:Program.cs


示例14: AttackableUnit_OnDamage

 private static void AttackableUnit_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (args.Source.IsEnemy)
     {
         var minion = args.Target as Obj_AI_Minion;
         if (minion != null && minion.IsMonster && minion.MaxHealth >= 3500)
         {
             if (!DamagesOnTime.ContainsKey(minion.NetworkId)) DamagesOnTime[minion.NetworkId] = new List<OnDamageEvent>();
             DamagesOnTime[minion.NetworkId].Add(new OnDamageEvent(Core.GameTickCount, args.Damage));
         }
         var sourceMinion = args.Source as Obj_AI_Minion;
         if (sourceMinion != null && sourceMinion.IsMonster && sourceMinion.MaxHealth >= 3500)
         {
             if (!DamagesOnTime.ContainsKey(sourceMinion.NetworkId)) DamagesOnTime[sourceMinion.NetworkId] = new List<OnDamageEvent>();
             DamagesOnTime[sourceMinion.NetworkId].Add(new OnDamageEvent(Core.GameTickCount, 0));
         }
     }
 }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:18,代码来源:JungleStealer.cs


示例15: OnDamage

 private static void OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (args.TargetNetworkId == Player.NetworkId)
     {
         lastTimeAttacked = Game.Time + (2*Game.Ping / 1000f);
     }
 }
开发者ID:Aferii,项目名称:LeagueSharp,代码行数:7,代码来源:Program.cs


示例16: OnDamage

 static void OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (sender == null || args.TargetNetworkId != sender.NetworkId)
     return;
     
     var Sender = (Obj_AI_Base)sender;
     
     if ((int) args.Type != 70)
     return;
     
     if(Qtimer > Utils.GameTimeTickCount - 120)
     {
         Qmove = false;
         MotionCancle();
     }
 }
开发者ID:SmokyBot,项目名称:LS,代码行数:16,代码来源:Riven.cs


示例17: AttackableUnit_OnDamage

        private static void AttackableUnit_OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            var obj = ObjectManager.GetUnitByNetworkId<GameObject>((uint) args.Target.NetworkId);

            if (obj.Type != GameObjectType.AIHeroClient)
            {
                return;
            }

            var hero = (AIHeroClient) obj;

            if (hero.IsEnemy)
            {
                return;
            }

            if (getCheckBoxItem(comboMenu, "ElAlistar.Combo.R"))
            {
                if (
                    ObjectManager.Get<AIHeroClient>()
                        .Any(
                            x =>
                                x.IsAlly && x.IsMe && !x.IsDead &&
                                ((int) (args.Damage/x.MaxHealth*100) >
                                 getSliderItem(comboMenu, "ElAlistar.Combo.RHeal.Damage") ||
                                 x.HealthPercent < getSliderItem(comboMenu, "ElAlistar.Combo.RHeal.HP") &&
                                 x.LSCountEnemiesInRange(1000) >= 1)))
                {
                    R.Cast();
                }
            }

            if (getCheckBoxItem(healMenu, "ElAlistar.Heal.E") &&
                Player.ManaPercent > getSliderItem(healMenu, "ElAlistar.Heal.Mana"))
            {
                if (
                    ObjectManager.Get<AIHeroClient>()
                        .Any(
                            x =>
                                x.IsAlly && !x.IsDead &&
                                getCheckBoxItem(healMenu, string.Format("healon{0}", x.NetworkId)) &&
                                ((int) (args.Damage/x.MaxHealth*100) > getSliderItem(healMenu, "Heal.Damage") ||
                                 x.HealthPercent < getSliderItem(healMenu, "Heal.HP")) && x.LSDistance(Player) < E.Range &&
                                x.LSCountEnemiesInRange(1000) >= 1))
                {
                    E.Cast();
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:49,代码来源:Program.cs


示例18: onDamage

 private static void onDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (args.SourceNetworkId != player.NetworkId)
         return;
 }
开发者ID:jmj8537,项目名称:GoodGuyJodu,代码行数:5,代码来源:DeathWalker.cs


示例19: OnDamage

 private static void OnDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
 {
     if (args.TargetNetworkId != Player.NetworkId || Orbwalk.CurrentMode != Orbwalker.Mode.Combo)
     {
         return;
     }
     if (GetValue<bool>("Combo", "Seraph") && Seraph.IsReady() &&
         Player.HealthPercent < GetValue<Slider>("Combo", "SeraphHpU").Value)
     {
         Seraph.Cast();
     }
 }
开发者ID:pandaChoi,项目名称:LeagueSharp-3,代码行数:12,代码来源:Ryze.cs


示例20: onDamage

        private static void onDamage(AttackableUnit sender, AttackableUnitDamageEventArgs args)
        {
            if (args.SourceNetworkId != player.NetworkId)
                return;
            Console.WriteLine("dmg: "+sender.Health+"  : "+player.GetAutoAttackDamage((Obj_AI_Base)sender));


        }
开发者ID:Sthephanfelix,项目名称:LeagueSharp-4,代码行数:8,代码来源:DeathWalker.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Attribute类代码示例发布时间:2022-05-24
下一篇:
C# AttackableUnit类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap