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


C# Obj_AI_Hero.GetSpellDamage方法代码示例

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


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

示例1: GetHeroAvgDamage

        /// <summary>
        /// Gets the hero average damage to the opposing team.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="Enemies">The enemies.</param>
        /// <returns></returns>
        public static float GetHeroAvgDamage(Obj_AI_Hero player, List<Obj_AI_Hero> Enemies)
        {
            var totalEnemies = Enemies.Count();
            if (totalEnemies == 0)
            {
                return -1;
            }
            var AADamage = Enemies.Aggregate(0, (current, s) => (int) (current + player.GetAutoAttackDamage(s) * 2));
            var QDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.Q).IsReady() ? player.GetSpellDamage(s, SpellSlot.Q) : 0f)));
            var WDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.W).IsReady() ? player.GetSpellDamage(s, SpellSlot.W) : 0f)));
            var EDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.E).IsReady() ? player.GetSpellDamage(s, SpellSlot.E) : 0f)));
            var RDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.R).IsReady() ? player.GetSpellDamage(s, SpellSlot.R) : 0f)));
            
            var itemsDamage = 0f;

            foreach (var item in player.InventoryItems)
            {
                foreach (var hero in Enemies)
                {
                    var itemID = item.Id;
                    switch (itemID)
                    {
                        case ItemId.Bilgewater_Cutlass:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.Bilgewater);
                            break;
                        case ItemId.Blade_of_the_Ruined_King:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Botrk);
                            break;
                        case ItemId.Hextech_Gunblade:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Hexgun);
                            break;
                        case ItemId.Frost_Queens_Claim:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.FrostQueenClaim);
                            break;
                        case ItemId.Tiamat_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Tiamat)
                                : 0f;
                            break;
                        case ItemId.Ravenous_Hydra_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Hydra)
                                : 0f;
                            break;
                        case ItemId.Liandrys_Torment:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.LiandrysTorment);
                            break;
                    }
                }
                
            }

            var totalDamage = AADamage + QDamage + WDamage + EDamage + RDamage + itemsDamage;

            return (float) totalDamage / totalEnemies;
        }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:65,代码来源:TFHelperCalculator.cs

示例2: DrawDamage

        private void DrawDamage(Obj_AI_Hero sender, Obj_AI_Hero target)
        {
            if (!target.IsVisible || target.IsDead)
                return;
            var screenPos = Drawing.WorldToScreen(target.Position);
            if (_slots.Sum(slot => sender.GetSpell(slot).Cooldown <= 0 ?  sender.GetSpellDamage(target, slot) : 0) > target.Health)
                Drawing.DrawText(screenPos.X, screenPos.Y, Color.Red, "Combo");
            else
            {
                var dps = _slots.Sum(slot => sender.GetSpellDamage(target, slot) / sender.GetSpell(slot).Cooldown) + sender.TotalAttackDamage * (1 / sender.AttackDelay) * ((sender.Crit + 100) / 100f) * (100 / (100f + target.Armor));
               //     Console.WriteLine(dps + " / "+ sender.TotalAttackDamage * (1 / sender.AttackDelay) * ((sender.Crit + 100) / 100f) * (100 / (100f + target.Armor)));

                Drawing.DrawText(screenPos.X, screenPos.Y, Color.Red, "> " + string.Format("{0:0.0} s", target.Health / dps));
            }
        }
开发者ID:jayblah,项目名称:TheNinow,代码行数:15,代码来源:ModuleComboTime.cs

示例3: GetHeroAvgDamage

        /// <summary>
        /// Gets the hero average damage to the opposing team.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="Enemies">The enemies.</param>
        /// <returns></returns>
        public static float GetHeroAvgDamage(Obj_AI_Hero player, List<Obj_AI_Hero> Enemies)
        {
            var totalEnemies = Enemies.Count();
            if (totalEnemies == 0)
            {
                return -1;
            }
            var AADamage = Enemies.Aggregate(0, (current, s) => (int) (current + player.GetAutoAttackDamage(s)));
            var QDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.Q).IsReady() ? player.GetSpellDamage(s, SpellSlot.Q) : 0)));
            var WDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.W).IsReady() ? player.GetSpellDamage(s, SpellSlot.W) : 0)));
            var EDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.E).IsReady() ? player.GetSpellDamage(s, SpellSlot.E) : 0)));
            var RDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.R).IsReady() ? player.GetSpellDamage(s, SpellSlot.R) : 0)));

            var totalDamage = AADamage + QDamage + WDamage + EDamage + RDamage;

            return (float) totalDamage / totalEnemies;
        }
开发者ID:luizssn,项目名称:LeagueSharp,代码行数:23,代码来源:TFHelperCalculator.cs

示例4: GetAlliesComboDmg

        public static double GetAlliesComboDmg(Obj_AI_Hero target, Obj_AI_Hero ally)
        {
            var SpellSlots = new List<SpellSlot>();
            double dmg = 0;
            #region SpellSots
            SpellSlots.Add(SpellSlot.Q);
            SpellSlots.Add(SpellSlot.W);
            SpellSlots.Add(SpellSlot.E);
            SpellSlots.Add(SpellSlot.R);
            #endregion

            foreach (var slot in SpellSlots)
            {
                var spell = ally.Spellbook.GetSpell(slot);

                dmg += ally.GetSpellDamage(target, slot);
                dmg += ally.GetAutoAttackDamage(target);
            }

            return dmg;
        }
开发者ID:Karbanthus,项目名称:LeagueSharp,代码行数:21,代码来源:Helper.cs

示例5: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;
            if (Player.CharData.BaseSkinName != ChampionName) return;
            //Create the spells

            Q = new Spell(SpellSlot.Q, 900);
            Q.SetSkillshot(0.25f, Q.Instance.SData.LineWidth, Q.Instance.SData.MissileSpeed, true, SkillshotType.SkillshotLine);
            W = new Spell(SpellSlot.W, 600);
            E = new Spell(SpellSlot.E, 600);
            R = new Spell(SpellSlot.R);
            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);

            //Create the menu
            Config = new Menu(ChampionName, ChampionName, true);

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            //Orbwalker submenu
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));

            //Load the orbwalker and add it to the submenu.
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Config.AddSubMenu(new Menu("Combo", "Combo"));
            Config.SubMenu("Combo")
                .AddItem(new MenuItem("ComboActive", "Combo!").SetValue(new KeyBind(32, KeyBindType.Press)));
            Config.SubMenu("Combo")
                .AddItem(new MenuItem("RootComboActive", "Root Combo!").SetValue(new KeyBind(32, KeyBindType.Press)));
            Config.AddSubMenu(new Menu("Harass", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q").SetValue(true));
            Config.SubMenu("Harass")
                .AddItem(
                    new MenuItem("HarassActive", "Harass!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));

            Config.AddSubMenu(new Menu("Farm", "Farm"));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseQFarm", "Use Q").SetValue(
                        new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 2)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseWFarm", "Use W").SetValue(
                        new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 3)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseEFarm", "Use E").SetValue(
                        new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 1)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("FreezeActive", "Freeze!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("LaneClearActive", "LaneClear!").SetValue(new KeyBind("V".ToCharArray()[0],
                        KeyBindType.Press)));

            Config.AddSubMenu(new Menu("JungleFarm", "JungleFarm"));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseQJFarm", "Use Q").SetValue(true));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseWJFarm", "Use W").SetValue(true));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseEJFarm", "Use E").SetValue(true));
            Config.SubMenu("JungleFarm")
                .AddItem(
                    new MenuItem("JungleFarmActive", "JungleFarm!").SetValue(new KeyBind("V".ToCharArray()[0],
                        KeyBindType.Press)));

            //Damage after combo:
            var dmgAfterComboItem = new MenuItem("DamageAfterCombo", "Draw damage after a rotation").SetValue(true);
            Utility.HpBarDamageIndicator.DamageToUnit += hero => (float)(Player.GetSpellDamage(hero, SpellSlot.Q) * 2 + Player.GetSpellDamage(hero, SpellSlot.W) + Player.GetSpellDamage(hero, SpellSlot.E));
            Utility.HpBarDamageIndicator.Enabled = dmgAfterComboItem.GetValue<bool>();
            dmgAfterComboItem.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue<bool>();
            };

            Config.AddSubMenu(new Menu("Drawings", "Drawings"));
            Config.SubMenu("Drawings")
                .AddItem(new MenuItem("QRange", "Q range").SetValue(new Circle(true, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("WRange", "W range").SetValue(new Circle(false, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("ERange", "E range").SetValue(new Circle(false, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(dmgAfterComboItem);
            Config.AddToMainMenu();

            //Add the events we are going to use:
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate += Game_OnGameUpdate;
            Orbwalking.BeforeAttack += OrbwalkingOnBeforeAttack;
        }
开发者ID:q51251,项目名称:L-,代码行数:95,代码来源:Program.cs

示例6: GetDmg

 private static float GetDmg(Obj_AI_Hero Sender, Obj_AI_Hero target, SpellSlot SpellSlot)
 {
     return (float)Sender.GetSpellDamage(target, SpellSlot);
 }
开发者ID:fgpmaia123,项目名称:KaiserSharp,代码行数:4,代码来源:DamagePrediction.cs

示例7: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            Game.PrintChat("Deniz617's Nunu Loading..");
            Player = ObjectManager.Player;
            if (Player.BaseSkinName != ChampionName) return;

            //Create the spells
            Q = new Spell(SpellSlot.Q, 125);
            W = new Spell(SpellSlot.W, 700);
            E = new Spell(SpellSlot.E, 580);
            R = new Spell(SpellSlot.R, 650);
            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);

            //Create the menu
            Config = new Menu(ChampionName, ChampionName, true);

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
            SimpleTs.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            //Orbwalker submenu
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));

            //Load the orbwalker and add it to the submenu.
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Config.AddSubMenu(new Menu("Combo", "Combo"));
            Config.SubMenu("Combo").AddItem(new MenuItem("ComboR", "Use R?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("MinEnemys", "Min enemys for R")).SetValue(new Slider(3, 5, 1));
            Config.SubMenu("Combo").AddItem(new MenuItem("ComboActive", "Combo!").SetValue(new KeyBind(32, KeyBindType.Press)));

            Config.AddSubMenu(new Menu("Harass", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseEHarass", "Use E").SetValue(true));
            Config.SubMenu("Harass").AddItem(new MenuItem("EMana", "Min Mana E").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Harass").AddItem(new MenuItem("HarassActive", "Harass!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));

            Config.AddSubMenu(new Menu("Farm", "Farm"));
            Config.SubMenu("Farm").AddItem(new MenuItem("UseQFarm", "Use Q").SetValue(true));

            Config.SubMenu("Farm").AddItem(new MenuItem("FreezeActive", "Freeze!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));

            //Damage after combo:
            var eDamage = new MenuItem("DamageAfterCombo", "Draw Damage After Used E").SetValue(true);
            Utility.HpBarDamageIndicator.DamageToUnit += hero => (float)(Player.GetSpellDamage(hero, SpellSlot.E));
            Utility.HpBarDamageIndicator.Enabled = eDamage.GetValue<bool>();
            eDamage.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue<bool>();
            };

            Config.AddSubMenu(new Menu("KS", "KS"));
            Config.SubMenu("KS").AddItem(new MenuItem("StealE", "Steal With E").SetValue(true));
            Config.SubMenu("KS").AddItem(new MenuItem("BreakU", "Break Ulti To Steal?").SetValue(false));
            Config.AddSubMenu(new Menu("Misc", "Misc"));
            Config.SubMenu("Misc").AddItem(new MenuItem("HealQ", "Use Q if").SetValue(true));
            Config.SubMenu("Misc").AddItem(new MenuItem("QHP", "HP is %").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Misc").AddItem(new MenuItem("QMana", "Min Mana Q").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Misc").AddItem(new MenuItem("GetAsisted", "Use W On Allies").SetValue(true));
            Config.SubMenu("Misc").AddItem(new MenuItem("WMana", "Min Mana W").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Misc").AddItem(new MenuItem("Harasser", "Harass Allways").SetValue(true));
            Config.AddSubMenu(new Menu("Jungle", "Jungle"));
            Config.SubMenu("Jungle").AddItem(new MenuItem("AutoSteal", "Auto Q or Smite").SetValue(true));
            Config.AddItem(new MenuItem("packetCast", "Packet Cast").SetValue(true));
            Config.AddSubMenu(new Menu("Drawings", "Drawings"));
            Config.SubMenu("Drawings").AddItem(new MenuItem("QRange", "Q range").SetValue(new Circle(true, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("WRange", "W range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("ERange", "E range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(eDamage);
            Config.AddToMainMenu();

            //Add the events we are going to use:
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnGameUpdate += Game_OnGameUpdate;
            Orbwalking.BeforeAttack += OrbwalkingOnBeforeAttack;
            Game.PrintChat("Deniz617's Nunu Loaded");
        }
开发者ID:padawanjebaczy,项目名称:NunuExplorer,代码行数:78,代码来源:Program.cs

示例8: Game_OnGameLoad


//.........这里部分代码省略.........
            Config.SubMenu("R").AddItem(new MenuItem("EnableRUsage", "Auto use charges").SetValue(true));
            Config.SubMenu("R").AddItem(new MenuItem("rMode", "Mode").SetValue(new StringList(new[] { "Normal", "Custom delays", "OnTap"})));
            Config.SubMenu("R").AddItem(new MenuItem("rModeKey", "OnTap key").SetValue(new KeyBind('T', KeyBindType.Press)));
            Config.SubMenu("R").AddSubMenu(new Menu("Custom delays", "Custom delays"));
            for (int i = 1; i <= 5; i++)
                Config.SubMenu("R").SubMenu("Custom delays").AddItem(new MenuItem("Delay"+i, "Delay"+i).SetValue(new Slider(0, 1500, 0)));
            Config.SubMenu("R").AddItem(new MenuItem("PingRKillable", "Ping on killable targets (only local)").SetValue(true));
            Config.SubMenu("R").AddItem(new MenuItem("BlockMovement", "Block right click while casting R").SetValue(false));
            Config.SubMenu("R").AddItem(new MenuItem("OnlyNearMouse", "Focus only targets near mouse").SetValue(false));
            Config.SubMenu("R").AddItem(new MenuItem("MRadius", "Radius").SetValue(new Slider(700, 1500, 300)));

            //Harass menu:
            Config.AddSubMenu(new Menu("Harass", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q").SetValue(true));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseWHarass", "Use W").SetValue(false));
            Config.SubMenu("Harass")
                .AddItem(
                    new MenuItem("HarassActive", "Harass!").SetValue(
                        new KeyBind(Config.Item("Farm").GetValue<KeyBind>().Key, KeyBindType.Press)));
            Config.SubMenu("Harass")
                .AddItem(
                    new MenuItem("HarassActiveT", "Harass (toggle)!").SetValue(new KeyBind('Y',
                        KeyBindType.Toggle)));

            //Farming menu:
            Config.AddSubMenu(new Menu("Farm", "Farm"));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseQFarm", "Use Q").SetValue(
                        new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 2)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseWFarm", "Use W").SetValue(
                        new StringList(new[] { "Freeze", "LaneClear", "Both", "No" }, 1)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("FreezeActive", "Freeze!").SetValue(
                        new KeyBind(Config.Item("Farm").GetValue<KeyBind>().Key, KeyBindType.Press)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("LaneClearActive", "LaneClear!").SetValue(
                        new KeyBind(Config.Item("LaneClear").GetValue<KeyBind>().Key, KeyBindType.Press)));

            //JungleFarm menu:
            Config.AddSubMenu(new Menu("JungleFarm", "JungleFarm"));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseQJFarm", "Use Q").SetValue(true));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseWJFarm", "Use W").SetValue(true));
            Config.SubMenu("JungleFarm")
                .AddItem(
                    new MenuItem("JungleFarmActive", "JungleFarm!").SetValue(
                        new KeyBind(Config.Item("LaneClear").GetValue<KeyBind>().Key, KeyBindType.Press)));

            //Misc
            Config.AddSubMenu(new Menu("Misc", "Misc"));
            Config.SubMenu("Misc").AddItem(new MenuItem("InterruptSpells", "Interrupt spells").SetValue(true));
            Config.SubMenu("Misc").AddItem(new MenuItem("AutoEGC", "AutoE gapclosers").SetValue(true));
            Config.SubMenu("Misc").AddItem(new MenuItem("UseVHHC", "Use very high hit chance").SetValue(true));

            //Damage after combo:
            var dmgAfterComboItem = new MenuItem("DamageAfterR", "Draw damage after (3 - 5)xR").SetValue(true);
            Utility.HpBarDamageIndicator.DamageToUnit += hero => (float)Player.GetSpellDamage(hero, SpellSlot.R) * new int[] {0, 3, 4, 5 }[Player.GetSpell(SpellSlot.R).Level];
            Utility.HpBarDamageIndicator.Enabled = dmgAfterComboItem.GetValue<bool>();
            dmgAfterComboItem.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue<bool>();
            };

            //Drawings menu:
            Config.AddSubMenu(new Menu("Drawings", "Drawings"));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("QRange", "Q range").SetValue(new Circle(true, Color.FromArgb(150, Color.DodgerBlue))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("WRange", "W range").SetValue(new Circle(true, Color.FromArgb(150, Color.DodgerBlue))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("ERange", "E range").SetValue(new Circle(false, Color.FromArgb(150, Color.DodgerBlue))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("RRange", "R range").SetValue(new Circle(false, Color.FromArgb(150, Color.DodgerBlue))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("RRangeM", "R range (minimap)").SetValue(new Circle(false,
                        Color.FromArgb(150, Color.DodgerBlue))));
            Config.SubMenu("Drawings")
                .AddItem(dmgAfterComboItem);
            Config.AddToMainMenu();

            //Add the events we are going to use:
            Game.OnUpdate += Game_OnGameUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget;
            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            Obj_AI_Hero.OnProcessSpellCast += Obj_AI_Hero_OnProcessSpellCast;
            Game.OnWndProc += Game_OnWndProc;
            Orbwalking.BeforeAttack += OrbwalkingOnBeforeAttack;
            Obj_AI_Hero.OnIssueOrder += Obj_AI_Hero_OnIssueOrder;
        }
开发者ID:Esk0r,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs

示例9: GetDamage

 static float GetDamage(Obj_AI_Hero hero,Obj_AI_Hero target,SpellSlot slot)
 {
     return (float)hero.GetSpellDamage(target, slot);
 }
开发者ID:ShineSharp,项目名称:LeagueSharp-5,代码行数:4,代码来源:DamagePrediction.cs

示例10: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;
            if (Player.BaseSkinName != ChampionName) return;

            //Create the spells
            Q = new Spell(SpellSlot.Q, 625);
            W = new Spell(SpellSlot.W, 600);
            E = new Spell(SpellSlot.E, 600);

            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);

            //Create the menu
            Config = new Menu(ChampionName, ChampionName, true);

            var targetSelectorMenu = new Menu("鐩爣閫夋嫨", "Target Selector");
            SimpleTs.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            //Orbwalker submenu
            Config.AddSubMenu(new Menu("鑷甫璧扮爫", "Orbwalking"));

            //Load the orbwalker and add it to the submenu.
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Config.AddSubMenu(new Menu("杩炴嫑", "Combo"));
            Config.SubMenu("Combo")
                .AddItem(new MenuItem("ComboActive", "杩炴嫑!").SetValue(new KeyBind(32, KeyBindType.Press)));

            Config.AddSubMenu(new Menu("楠氭壈", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "浣跨敤Q").SetValue(true));
            Config.SubMenu("Harass")
                .AddItem(
                    new MenuItem("HarassActive", "楠氭壈!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));

            Config.AddSubMenu(new Menu("琛ュ叺", "Farm"));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseQFarm", "浣跨敤Q").SetValue(
                        new StringList(new[] { "琛ュ叺", "娓呯嚎", "鍏ㄩ儴", "No" }, 2)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseWFarm", "浣跨敤W").SetValue(
                        new StringList(new[] { "琛ュ叺", "娓呯嚎", "鍏ㄩ儴", "No" }, 3)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("UseEFarm", "浣跨敤E").SetValue(
                        new StringList(new[] { "琛ュ叺", "娓呯嚎", "鍏ㄩ儴", "No" }, 1)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("FreezeActive", "娓呯嚎!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Farm")
                .AddItem(
                    new MenuItem("LaneClearActive", "娓呯嚎!").SetValue(new KeyBind("V".ToCharArray()[0],
                        KeyBindType.Press)));

            Config.AddSubMenu(new Menu("娓呴噹", "JungleFarm"));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseQJFarm", "浣跨敤Q").SetValue(true));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseWJFarm", "浣跨敤W").SetValue(true));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseEJFarm", "浣跨敤E").SetValue(true));
            Config.SubMenu("JungleFarm")
                .AddItem(
                    new MenuItem("JungleFarmActive", "娓呴噹!").SetValue(new KeyBind("V".ToCharArray()[0],
                        KeyBindType.Press)));

            //Damage after combo:
            var dmgAfterComboItem = new MenuItem("DamageAfterCombo", "缁樺埗鎶€鑳芥€讳激瀹硘").SetValue(true);
            Utility.HpBarDamageIndicator.DamageToUnit += hero => (float)(Player.GetSpellDamage(hero, SpellSlot.Q) * 2 + Player.GetSpellDamage(hero, SpellSlot.W) + Player.GetSpellDamage(hero, SpellSlot.E));
            Utility.HpBarDamageIndicator.Enabled = dmgAfterComboItem.GetValue<bool>();
            dmgAfterComboItem.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue<bool>();
            };

            Config.AddSubMenu(new Menu("鑼冨洿鏄剧ず", "Drawings"));
            Config.SubMenu("Drawings")
                .AddItem(new MenuItem("QRange", "Q鑼冨洿").SetValue(new Circle(true, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("WRange", "W鑼冨洿").SetValue(new Circle(false, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings")
                .AddItem(
                    new MenuItem("ERange", "E鑼冨洿").SetValue(new Circle(false, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(dmgAfterComboItem);
            Config.AddToMainMenu();

             {

            Config.AddSubMenu(new Menu("L#涓枃绀惧尯姹夊寲", "LOLL35.Com"));
                Config.SubMenu("LOLL35.Com").AddItem(new MenuItem("wangzhi", "www.loll35.com"));
                Config.SubMenu("LOLL35.Com").AddItem(new MenuItem("qunhao2", "姹夊寲缇わ細397983217"));
            }

            //Add the events we are going to use:
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnGameUpdate += Game_OnGameUpdate;
            Orbwalking.BeforeAttack += OrbwalkingOnBeforeAttack;
        }
开发者ID:lanyi777,项目名称:CN,代码行数:100,代码来源:Program.cs

示例11: CalculateDamage

 /// <summary>
 ///     The calculate damage.
 /// </summary>
 /// <param name="source">
 ///     The source.
 /// </param>
 /// <param name="target">
 ///     The target.
 /// </param>
 /// <param name="spell">
 ///     The spell.
 /// </param>
 /// <returns>
 /// </returns>
 private static double CalculateDamage(Obj_AI_Hero source, Obj_AI_Base target, SpellSlot spell)
 {
     return source.GetSpellDamage(target, spell);
 }
开发者ID:werdbrian,项目名称:AIO,代码行数:18,代码来源:HpDamageIndicator.cs


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