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


C# Item.IsOwned方法代码示例

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


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

示例1: Game_OnTick

 private static void Game_OnTick(EventArgs args)
 {
     HPOT = new Item((int)ItemId.Health_Potion);
     if (_Player.HealthPercent <= 60 && HPOT.IsOwned())
     {
         HPOT.Cast();
     }
     if (Spells[SpellSlot.E].IsReady() && !_Player.IsDead)
     {
         Brain.KStiloso();
     }
     switch (Orbwalker.ActiveModesFlags)
     {
         case Orbwalker.ActiveModes.Combo:
             Brain.Combo();
             return;
         case Orbwalker.ActiveModes.Harass:
             Brain.Harass();
             return;
         case Orbwalker.ActiveModes.LaneClear:
            // Brain.LaneClear();
             return;
         case Orbwalker.ActiveModes.JungleClear:
            // Brain.LaneClear();
             return;
     }
 }
开发者ID:lolscripts,项目名称:zilean,代码行数:27,代码来源:Program.cs

示例2: CastZhonya

        public static Item zhonya; // Zhonya test

        #endregion Fields

        #region Methods

        /// <summary>
        /// Casts zhonya if Katarina is low on health.
        /// </summary>
        /// <param name="myHero">AIHeroClient reference -- ourselves</param>
        /// <returns>true if zhonya suceeded</returns>
        public static bool CastZhonya(AIHeroClient myHero, int zHealth)
        {
            zhonya = new Item((int)ItemId.Zhonyas_Hourglass);
            if(zhonya == null || !zhonya.IsReady() || !zhonya.IsOwned()) return false;

            if(myHero.HealthPercent <= zHealth) {
                zhonya.Cast();
                return true;
            }

            return false;
        }
开发者ID:infyhr,项目名称:EloBuddy,代码行数:23,代码来源:Helpers.cs

示例3: Combo

        public static void Combo()
        {
            BTRK1 = new Item((int)ItemId.Blade_of_the_Ruined_King);
            BTRK2 = new Item((int)ItemId.Bilgewater_Cutlass);
            YOMU = new Item((int)ItemId.Youmuus_Ghostblade);
            var target = TargetSelector2.GetTarget(Program.Spells[SpellSlot.W].Range, DamageType.Physical);
            if (target == null) return;
            if (MenuX.ComboMenu["useWCombo"].Cast<CheckBox>().CurrentValue)
            {
                if (target.IsValidTarget(Program.Spells[SpellSlot.W].Range) && Program.Spells[SpellSlot.W].IsReady())
                {
                    Program.Spells[SpellSlot.W].Cast(target);
                }
            }
            if (MenuX.ComboMenu["useRCombo"].Cast<CheckBox>().CurrentValue)
            {
                foreach (
                    var enemy in
                        ObjectManager.Get<AIHeroClient>()
                            .Where(enemy => enemy.Distance(_Player) <= Program.Spells[SpellSlot.R].Range))
                {
                    if (enemy.CountEnemiesInRange(850) >= MenuX.ComboMenu["minRCombo"].Cast<Slider>().CurrentValue)
                    {
                        Program.Spells[SpellSlot.R].Cast();
                    }
                }
            }
            if (target.HealthPercent <= 80 && (BTRK1.IsOwned() || BTRK2.IsOwned()) && (BTRK1.IsReady() || BTRK2.IsReady()))
            {
                BTRK1.Cast(target);
                BTRK2.Cast(target);
            }
            if (target.HealthPercent <= 75 && YOMU.IsOwned() && YOMU.IsReady())
            {
                YOMU.Cast();
            }

        }
开发者ID:FireBuddy,项目名称:zilean,代码行数:38,代码来源:Brain.cs

示例4: HasYellowWardPlus

        private static bool HasYellowWardPlus()
        {
            YellowWardPlus = new Item(3361, 600);

            if (YellowWardPlus.IsOwned(_playerClient))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:HeheheM,项目名称:EloBuddy-2,代码行数:13,代码来源:WardJumper.cs

示例5: HasPinkWard

        private static bool HasPinkWard()
        {
            PinkWard = new Item(2043, 600);

            if (PinkWard.IsOwned(_playerClient))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:HeheheM,项目名称:EloBuddy-2,代码行数:13,代码来源:WardJumper.cs

示例6: HasGreenWard

        private static bool HasGreenWard()
        {
            GreenWard = new Item(2044, 600);

            if (GreenWard.IsOwned(_playerClient))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:HeheheM,项目名称:EloBuddy-2,代码行数:13,代码来源:WardJumper.cs

示例7: Orbwalker_OnPostAttack

        static void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var hydra = new Item((int)ItemId.Ravenous_Hydra_Melee_Only);
                var youmuus = new Item((int)ItemId.Youmuus_Ghostblade);

                if (hydra.IsOwned() && hydra.IsReady() || youmuus.IsOwned() && youmuus.IsReady())
                {
                    hydra.Cast();
                    youmuus.Cast();
                }
            }
        }
开发者ID:flashreverse,项目名称:EloBuddy,代码行数:14,代码来源:Program.cs

示例8: TryBuySell

 private static void TryBuySell(Item item, char bs)
 {
     switch (bs)
     {
         case 'b':
         {
             if (Player.Instance.Gold >= goldReq)
             {
                 Shop.BuyItem(item.Id);
                 current++;
             }
             /*else if (Settings.buyComp.CurrentValue)
                 {
                     foreach (var comp1 in item.GetComponents().OrderByDescending(x => x.GoldRequired()))
                     {
                         if (Shop.BuyItem(comp1.Id))
                             goldReq -= comp1.ItemInfo.Gold.Base;
                     }
                 }*/
         }
             break;
         case 's':
             if (item.Id == hppot.Id)
             {
                 if (hppot.IsOwned())
                 {
                     Shop.SellItem(GetSlot(hppot).Slot);
                     current++;
                 }
                 else if (bisc.IsOwned())
                 {
                     Shop.SellItem(GetSlot(bisc).Slot);
                     current++;
                 }
             }
             else if (item.IsOwned())
             {
                 Shop.SellItem(GetSlot(item).Slot);
                 current++;
             }
             break;
         default:
             Console.WriteLine("Error: item set for {0} was not set properly - b:ItemId or s:ItemId",
                 Player.Instance.ChampionName);
             break;
     }
 }
开发者ID:FireBuddy,项目名称:elobuddy,代码行数:47,代码来源:Program.cs

示例9: LastHit

        private static void LastHit()
        {
            var minions = ObjectManager.Get<Obj_AI_Minion>().OrderBy(m => m.Health).Where(m => m.IsEnemy);
            var useQ = SettingsMenu["Qlast"].Cast<CheckBox>().CurrentValue;
            var lich = new Item((int)ItemId.Lich_Bane);

            if (minions == null)
                return;
            foreach(var minion in minions)
            {
                if (Q.IsReady()&& lich.IsOwned() && useQ && minion.IsValidTarget(Q.Range) && minion.Health <= _Player.GetSpellDamage(minion, SpellSlot.Q) + _Player.GetItemDamage(minion, ItemId.Lich_Bane))
                {
                    Q.Cast(minion);
                }
                if (Q.IsReady() && useQ && minion.IsValidTarget(Q.Range) && minion.Health <= _Player.GetSpellDamage(minion, SpellSlot.Q))
                {
                    Q.Cast(minion);
                }
            }
        }
开发者ID:werdbrian,项目名称:Hu3Series,代码行数:20,代码来源:Program.cs

示例10: KillSteal

        private static void KillSteal()
        {
            var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
            var useQ = SettingsMenu["Qks"].Cast<CheckBox>().CurrentValue;
            var useR = SettingsMenu["Rks"].Cast<CheckBox>().CurrentValue;
            var lich = new Item((int)ItemId.Lich_Bane);

            if (useR && R.IsReady() && !target.IsZombie && R.GetPrediction(target).HitChance >= HitChance.High && target.IsValidTarget(R.Range) && target.Health
                <= _Player.GetSpellDamage(target, SpellSlot.R))
            {
                R.Cast(target);
            }
            if (useQ && Q.IsReady() && !target.IsZombie && target.Health <= _Player.GetSpellDamage(target, SpellSlot.Q))
            {
                Q.Cast(target);
            }
            if (useQ && Q.IsReady() && lich.IsOwned() && !target.IsZombie && target.Health <= _Player.GetSpellDamage(target, SpellSlot.Q) + _Player.GetItemDamage(target, ItemId.Lich_Bane))
            {
                Q.Cast(target);
            }
        }
开发者ID:werdbrian,项目名称:Hu3Series,代码行数:21,代码来源:Program.cs


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