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


C# Items.Item.IsReady方法代码示例

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


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

示例1: Game_OnGameUpdate

        private void Game_OnGameUpdate(EventArgs args)
        {
            if (!IsActive() || !_db.IsReady())
                return;

            AutoItems.UpdateCCList();
            List<BuffInstance> buffList = Activator.GetActiveCcBuffs(AutoItems._buffs);

            if (buffList.Count() >=
                AutoDervishBladeActivator.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                AutoDervishBladeActivator.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfDervishBlade")
                    .GetValue<bool>() &&
                Activator._lastItemCleanseUse + 1 < Game.Time)
            {
                var db = new Items.Item(3137, 0);
                if (db.IsReady())
                {
                    db.Cast();
                    Activator._lastItemCleanseUse = Game.Time;
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:24,代码来源:AutoDervishBlade.cs

示例2: UseDb

        private void UseDb()
        {
            if (!MainMenu.ActivatorDefensiveCleanseSelf.GetActive())
                return;

            List<BuffInstance> buffList = GetActiveCcBuffs(_buffs);

            if (buffList.Count() >=
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfDervishBlade")
                    .GetValue<bool>() &&
                _lastItemCleanseUse + 1 < Game.Time)
            {
                var db = new Items.Item(3137, 0);
                if (db.IsReady())
                {
                    db.Cast();
                    _lastItemCleanseUse = Game.Time;
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:23,代码来源:ActivatorOld.cs

示例3: UseTalismanofAscension

 private void UseTalismanofAscension()
 {
     if (
         !MainMenu.ActivatorDefensiveShieldBoost.GetMenuItem(
             "SAwarenessActivatorDefensiveShieldBoostTalismanofAscension").GetValue<bool>())
         return;
     var ta = new Items.Item(3069, 0);
     Obj_AI_Hero hero = TargetSelector.GetTarget(1000, TargetSelector.DamageType.True);
     if (hero != null && hero.IsValid && !ImFleeing(hero) && IsFleeing(hero))
     {
         if ((hero.Health/hero.MaxHealth*100) <= 50)
         {
             if (ta.IsReady())
             {
                 ta.Cast();
             }
         }
     }
     else if (ObjectManager.Player.ServerPosition.CountEnemiesInRange(1000) >
              ObjectManager.Get<Obj_AI_Hero>().Where((units => units.IsAlly)).Count((units =>
                  (double)
                      Vector2.Distance(ObjectManager.Player.Position.To2D(),
                          units.Position.To2D()) <= (double) 1000)) &&
              ObjectManager.Player.Health != ObjectManager.Player.MaxHealth)
     {
         if (ta.IsReady())
         {
             ta.Cast();
         }
     }
 }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:31,代码来源:ActivatorOld.cs

示例4: UseRanduins

        private void UseRanduins()
        {
            if (!MainMenu.ActivatorDefensiveDebuffSlow.GetActive())
                return;

            Obj_AI_Hero hero = GetHighestAdEnemy();
            int count = ObjectManager.Player.ServerPosition.CountEnemiesInRange(400);
            if (hero == null || !hero.IsValid || hero.IsDead)
                return;

            if (
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem("SAwarenessActivatorDefensiveDebuffSlowRanduins")
                    .GetValue<bool>() &&
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem("SAwarenessActivatorDefensiveDebuffSlowConfigRanduins")
                    .GetValue<Slider>()
                    .Value >= count &&
                ImFleeing(hero) || IsFleeing(hero) && !ImFleeing(hero))
            {
                var randuins = new Items.Item(3143, 0);
                if (randuins.IsReady())
                {
                    randuins.Cast();
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:25,代码来源:ActivatorOld.cs

示例5: UseOffensiveItems_OnProcessSpellCast

        private void UseOffensiveItems_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!MainMenu.ActivatorOffensive.GetActive())
                return;
            if (sender.NetworkId != ObjectManager.Player.NetworkId)
                return;
            if (!args.SData.Name.ToLower().Contains("attack") || args.Target.Type != GameObjectType.obj_AI_Hero)
                return;

            if (MainMenu.ActivatorOffensiveAd.GetActive())
            {
                Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
                if (target == null || !target.IsValid)
                    return;
                var entropy = new Items.Item(3184, 400);
                var hydra = new Items.Item(3074, 400);
                var botrk = new Items.Item(3153, 450);
                var tiamat = new Items.Item(3077, 450);
                var devinesword = new Items.Item(3131, 900);
                var youmuus = new Items.Item(3142, 900);

                if (entropy.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdEntropy").GetValue<bool>())
                {
                    entropy.Cast();
                }
                if (hydra.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdRavenousHydra")
                        .GetValue<bool>())
                {
                    hydra.Cast();
                }
                if (botrk.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdBOTRK").GetValue<bool>())
                {
                    botrk.Cast(target);
                }
                if (tiamat.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdTiamat").GetValue<bool>())
                {
                    tiamat.Cast();
                }
                if (devinesword.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdSwordOfTheDevine")
                        .GetValue<bool>())
                {
                    devinesword.Cast();
                }
                if (youmuus.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdYoumuusGhostblade")
                        .GetValue<bool>())
                {
                    youmuus.Cast();
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:56,代码来源:ActivatorOld.cs

示例6: UseOffensiveItems_OnGameUpdate

 private void UseOffensiveItems_OnGameUpdate()
 {
     if (!MainMenu.ActivatorOffensive.GetActive() ||
         !MainMenu.ActivatorOffensive.GetMenuItem("SAwarenessActivatorOffensiveKey").GetValue<KeyBind>().Active)
         return;
     if (MainMenu.ActivatorOffensiveAd.GetActive())
     {
         Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
         if (target == null || !target.IsValid)
             return;
         var botrk = new Items.Item(3153, 450);
         if (botrk.IsReady() &&
             MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdBOTRK").GetValue<bool>())
         {
             botrk.Cast(target);
         }
     }
     if (MainMenu.ActivatorOffensiveAp.GetActive())
     {
         Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
         if (target == null || !target.IsValid)
             return;
         var bilgewater = new Items.Item(3144, 450);
         var hextech = new Items.Item(3146, 700);
         var blackfire = new Items.Item(3188, 750);
         var dfg = new Items.Item(3128, 750);
         var twinshadows = new Items.Item(3023, 1000);
         if (Utility.Map.GetMap().Type == Utility.Map.MapType.CrystalScar)
             twinshadows = new Items.Item(3290, 1000);
         if (bilgewater.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApBilgewaterCutlass")
                 .GetValue<bool>())
         {
             bilgewater.Cast(target);
         }
         if (hextech.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApHextechGunblade")
                 .GetValue<bool>())
         {
             hextech.Cast(target);
         }
         if (blackfire.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApBlackfireTorch").GetValue<bool>())
         {
             blackfire.Cast(target);
         }
         if (dfg.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApDFG").GetValue<bool>())
         {
             dfg.Cast(target);
         }
         if (twinshadows.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApTwinShadows").GetValue<bool>())
         {
             twinshadows.Cast();
         }
     }
 }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:58,代码来源:ActivatorOld.cs

示例7: UseMs

        private void UseMs()
        {
            if (!MainMenu.ActivatorDefensiveCleanseSelf.GetActive())
                return;

            List<BuffInstance> buffList = GetActiveCcBuffs(_buffs);

            if (buffList.Count() >=
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem(
                    "SAwarenessActivatorDefensiveCleanseSelfMercurialScimitar").GetValue<bool>() &&
                _lastItemCleanseUse + 1 < Game.Time)
            {
                var ms = new Items.Item(3139, 0);
                if (ms.IsReady())
                {
                    foreach (BuffInstance instance in buffList)
                    {
                        Console.WriteLine(instance.Name);
                    }
                    ms.Cast();
                    _lastItemCleanseUse = Game.Time;
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:27,代码来源:ActivatorOld.cs

示例8: UseMikaelsCrucible

        private void UseMikaelsCrucible()
        {
            if (!MainMenu.ActivatorDefensiveMikaelCleanse.GetActive() && _lastItemCleanseUse + 1 > Game.Time)
                return;

            var mc = new Items.Item(3222, 750);

            if (
                MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                    "SAwarenessActivatorDefensiveMikaelCleanseConfigAlly").GetValue<bool>())
            {
                foreach (Obj_AI_Hero ally in ObjectManager.Get<Obj_AI_Hero>())
                {
                    if (ally.IsEnemy)
                        return;

                    if (ally.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 750 && !ally.IsDead &&
                        !ally.HasBuff("Recall"))
                    {
                        double health = (ally.Health/ally.MaxHealth)*100;
                        List<BuffInstance> activeCc = GetActiveCcBuffs(ally, _buffs);
                        if (activeCc.Count >=
                            MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                                "SAwarenessActivatorDefensiveMikaelCleanseConfigMinSpells").GetValue<Slider>().Value)
                        {
                            if (mc.IsReady())
                            {
                                mc.Cast(ally);
                                _lastItemCleanseUse = Game.Time;
                            }
                        }
                        if (health <= MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                            "SAwarenessActivatorDefensiveMikaelCleanseConfigAllyHealth").GetValue<Slider>().Value)
                        {
                            if (mc.IsReady())
                            {
                                mc.Cast(ally);
                                _lastItemCleanseUse = Game.Time;
                            }
                        }
                    }
                }
            }
            else
            {
                if (!ObjectManager.Player.IsDead && !ObjectManager.Player.HasBuff("Recall"))
                {
                    double health = (ObjectManager.Player.Health/ObjectManager.Player.MaxHealth)*100;
                    List<BuffInstance> activeCc = GetActiveCcBuffs(_buffs);
                    if (activeCc.Count >=
                        MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                            "SAwarenessActivatorDefensiveMikaelCleanseConfigMinSpells").GetValue<Slider>().Value)
                    {
                        if (mc.IsReady())
                        {
                            mc.Cast(ObjectManager.Player);
                            _lastItemCleanseUse = Game.Time;
                        }
                    }
                    if (health <= MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                        "SAwarenessActivatorDefensiveMikaelCleanseConfigSelfHealth").GetValue<Slider>().Value)
                    {
                        if (mc.IsReady())
                        {
                            mc.Cast(ObjectManager.Player);
                            _lastItemCleanseUse = Game.Time;
                        }
                    }
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:71,代码来源:ActivatorOld.cs

示例9: UseLocketofIronSolari

 private void UseLocketofIronSolari()
 {
     if (
         !MainMenu.ActivatorDefensiveShieldBoost.GetMenuItem(
             "SAwarenessActivatorDefensiveShieldBoostLocketofIronSolari").GetValue<bool>())
         return;
     foreach (var pair in Damages)
     {
         double damage = CalcMaxDamage(pair.Key);
         Obj_AI_Hero hero = pair.Key;
         CheckForHit(hero);
         if (!hero.IsDead)
         {
             var lis = new Items.Item(3190, 700);
             if (hero.Health < damage && hero.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 700)
             {
                 if (lis.IsReady())
                 {
                     lis.Cast();
                 }
             }
             else if (GetNegativBuff(hero) != null && Game.Time > GetNegativBuff(hero).EndTime - 0.1)
             {
                 if (lis.IsReady())
                 {
                     lis.Cast();
                 }
             }
         }
     }
 }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:31,代码来源:ActivatorOld.cs

示例10: UseGuardiansHorn

 private void UseGuardiansHorn()
 {
     if (
         !MainMenu.ActivatorDefensiveShieldBoost.GetMenuItem("SAwarenessActivatorDefensiveShieldBoostGuardiansHorn")
             .GetValue<bool>())
         return;
     if (Utility.Map.GetMap().Type != Utility.Map.MapType.HowlingAbyss)
         return;
     Obj_AI_Hero hero = TargetSelector.GetTarget(1000, TargetSelector.DamageType.True);
     if (hero != null && hero.IsValid && !ImFleeing(hero) && IsFleeing(hero))
     {
         var gh = new Items.Item(2051, 0);
         if (gh.IsReady())
         {
             gh.Cast();
         }
     }
 }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:18,代码来源:ActivatorOld.cs

示例11: UseFrostQueensClaim

        private void UseFrostQueensClaim()
        {
            if (!MainMenu.ActivatorDefensiveDebuffSlow.GetActive())
                return;

            Obj_AI_Hero enemy = null;
            int count = 0;
            int nCount = 0;

            foreach (Obj_AI_Hero hero1 in ObjectManager.Get<Obj_AI_Hero>())
            {
                if (hero1.IsEnemy && hero1.IsVisible)
                {
                    if (hero1.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 750)
                    {
                        foreach (Obj_AI_Hero hero2 in ObjectManager.Get<Obj_AI_Hero>())
                        {
                            if (hero2.IsEnemy && hero2.IsVisible)
                            {
                                if (hero2.ServerPosition.Distance(hero1.ServerPosition) < 200)
                                {
                                    count++;
                                }
                            }
                        }
                        if (count == 0)
                        {
                            enemy = hero1;
                        }
                        else if (nCount < count)
                        {
                            nCount = count;
                            enemy = hero1;
                        }
                    }
                }
            }

            if (enemy == null || !enemy.IsValid || enemy.IsDead ||
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem(
                    "SAwarenessActivatorDefensiveDebuffSlowConfigFrostQueensClaim").GetValue<Slider>().Value > nCount)
                return;

            if (
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem("SAwarenessActivatorDefensiveDebuffSlowFrostQueensClaim")
                    .GetValue<bool>())
            {
                var fqc = new Items.Item(3092, 850);
                if (fqc.IsReady())
                {
                    fqc.Cast(enemy.ServerPosition);
                }
            }
        }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:54,代码来源:ActivatorOld.cs

示例12: UseQss

        private void UseQss()
        {
            if (!Menu.ActivatorDefensiveCleanseSelf.GetActive())
                return;

            List<BuffInstance> buffList = GetActiveCcBuffs(_buffs);

            if (buffList.Count() >=
                Menu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                Menu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfQSS")
                    .GetValue<bool>() &&
                _lastItemCleanseUse + 1 < Game.Time)
            {
                var qss = new Items.Item(3140, 0);
                if (qss.IsReady())
                {
                    qss.Cast();
                    _lastItemCleanseUse = Game.Time;
                }
            }
        }
开发者ID:zjian1013,项目名称:SAwareness,代码行数:23,代码来源:Activator.cs

示例13: Obj_AI_Hero_OnProcessSpellCast

		private static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
		{
			if (sender.IsEnemy && sender.Type == GameObjectType.obj_AI_Minion)
			{
				if (GetBool("FW") && W.IsReady() && GetActive("FarmActive") && args.Target.Name == Player.Name && Player.Mana/Player.MaxMana*100 >= GetSlider("MP") )
				{
					if (GrabAlly("HP") == null) W.Cast(sender,GetBool("UsePacket"));
					else W.CastIfHitchanceEquals(GrabAlly("HP"), HitC ,GetBool("UsePacket"));
				}
				
			}
			if (GetBool("AutoW") && W.IsReady() && sender.IsEnemy && (sender.Type == GameObjectType.obj_AI_Hero || sender.Type == GameObjectType.obj_AI_Turret ))
			{
				if ( (args.SData.Name != null && IsOnTheLine(Player.Position,args.Start,args.End)) || (args.Target == Player && Player.Distance(sender) <= 450) || args.Target == Player && Utility.UnderTurret(Player,true))
				{
					if (GrabAlly("HP") == null) W.Cast(sender,GetBool("UsePacket"));
					else W.CastIfHitchanceEquals(GrabAlly("HP"), HitC ,GetBool("UsePacket"));
				}
			}
			if (sender.IsValid && sender.IsEnemy && args.SData.Name == "YasuoWMovingWall")
			{
				WallCastT = Environment.TickCount;
				YasuoWallCastedPos = sender.ServerPosition.To2D();
			}
			if (!GetBool("Mikeal") && !GetBool("Iron")) return;
			Items.Item Mikael = new Items.Item(3222,750);;
			Items.Item Iron = new Items.Item(3190,600);;
			if (!Mikael.IsReady() || !Iron.IsReady()) return;
			if (sender.IsValid && sender.IsEnemy)
			{
				var allies = GrabAlly("ItemHP");
				if (allies != null && args.Target == allies)
				{
					if (Utility.CountEnemiesInRange(allies,1200) > 0 && !Utility.InFountain(allies))
					{
						if (Mikael.IsReady() && Mikael.IsInRange(allies)) Mikael.Cast(allies);
						if (Iron.IsReady() && Iron.IsInRange(allies)) Iron.Cast();
					}
					else if (sender.Type == GameObjectType.obj_AI_Turret && Utility.UnderTurret(allies,true))
					{
						if (Mikael.IsReady() && Mikael.IsInRange(allies)) Mikael.Cast(allies);
						if (Iron.IsReady() && Iron.IsInRange(allies)) Iron.Cast();
					}
				}
				else if (allies == null && args.Target == Player && !Utility.InFountain(Player))
				{
					if (Player.HealthPercentage() <= GetSlider("ItemHP") && Utility.CountEnemiesInRange(Player,1200) > 0)
					{
						if (Mikael.IsReady()) Mikael.Cast(Player);
						if (Iron.IsReady()) Iron.Cast();
					}
				}
			}
		}
开发者ID:qktlfflzk,项目名称:Backup5.4,代码行数:54,代码来源:Program.cs


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