本文整理汇总了C#中System.Item.IsReady方法的典型用法代码示例。如果您正苦于以下问题:C# Item.IsReady方法的具体用法?C# Item.IsReady怎么用?C# Item.IsReady使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Item
的用法示例。
在下文中一共展示了Item.IsReady方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: Clear
private static void Clear()
{
if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) &&
!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
{
return;
}
var minionObj =
ObjectManager.Get<Obj_AI_Minion>()
.Where(minion => !minion.IsAlly && minion.Distance(Player.Instance) < Spells.E.Range);
if (!minionObj.Any())
{
return;
}
var clearE = Menu.ClearMenu["Clear.E"].Cast<CheckBox>().CurrentValue;
if (clearE && Spells.E.IsReady())
{
var obj = minionObj.FirstOrDefault(minion => minion.Health < SpellSlot.E.GetDamage(minion));
if (obj == null && !minionObj.Any(minion => Player.Instance.IsInAutoAttackRange(minion)))
{
obj = minionObj.MinOrDefault(minion => minion.Health);
}
if (obj != null)
{
Spells.E.Cast(obj);
}
}
var clearHydra = Menu.ClearMenu["Clear.Hydra"].Cast<CheckBox>().CurrentValue;
if (clearHydra)
{
var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
var item = hydra.IsReady() ? hydra : tiamat;
if ((Item.HasItem((int) ItemId.Ravenous_Hydra_Melee_Only, Player.Instance) ||
Item.HasItem((int) ItemId.Tiamat_Melee_Only, Player.Instance)) && item.IsReady() &&
(minionObj.Count(i => item.IsInRange(i)) > 2 ||
minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player.Instance) < item.Range - 80)))
{
item.Cast();
}
}
}
示例3: Potions
private static void Potions()
{
if (Utils.isChecked(MenuX.Misc, "usePot") && !Utils._Player.IsInShopRange() &&
!Utils._Player.HasBuff("recall"))
{
var hpPot = new Item(2003);
var manaPot = new Item(2004);
var flask = new Item(2041);
if ((hpPot.IsReady() || flask.IsReady()) &&
(!Utils._Player.HasBuff("RegenerationPotion") || Utils._Player.HasBuff("ItemCrystalFlask")))
{
if (Utils._Player.CountEnemiesInRange(700) > 0 &&
Utils._Player.Health + 200 < Utils._Player.MaxHealth)
{
if (Item.HasItem(hpPot.Id))
{
hpPot.Cast();
}
else
{
flask.Cast();
}
}
else if (Utils._Player.Health < Utils._Player.MaxHealth*0.6)
{
if (Item.HasItem(hpPot.Id))
{
hpPot.Cast();
}
else
{
flask.Cast();
}
}
}
if (manaPot.IsReady() && !Utils._Player.HasBuff("FlaskOfCrystalWater"))
{
if (Utils._Player.Mana < Utils._Player.MaxMana*0.6)
{
manaPot.Cast();
}
}
}
}
示例4: Potions
private static void Potions()
{
if (MenuX.Misc.UsePot && !_Player.IsInShopRange() && !_Player.HasBuff("recall"))
{
var hpPot = new Item(2003);
var manaPot = new Item(2004);
var biscuit = new Item(2010);
if ((hpPot.IsReady() || biscuit.IsReady()) &&
(!_Player.HasBuff("RegenerationPotion") || _Player.HasBuff("ItemMiniRegenPotion")))
{
if (_Player.CountEnemiesInRange(700) > 0 && _Player.Health + 200 < _Player.MaxHealth)
{
if (Item.HasItem(hpPot.Id))
{
hpPot.Cast();
}
else
{
biscuit.Cast();
}
}
else if (_Player.Health < _Player.MaxHealth*0.6)
{
if (Item.HasItem(hpPot.Id))
{
hpPot.Cast();
}
else
{
biscuit.Cast();
}
}
}
if (manaPot.IsReady() && !_Player.HasBuff("FlaskOfCrystalWater"))
{
if (_Player.Mana < _Player.MaxMana*0.6)
{
manaPot.Cast();
}
}
}
}
示例5: 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();
}
}
示例6: Tick
// Combo Draw Damage
private static void Tick(EventArgs args)
{
QHitChance = PredMenu["predq"].Cast<CheckBox>().CurrentValue ? HitChance.Medium : HitChance.High;
EHitChance = PredMenu["prede"].Cast<CheckBox>().CurrentValue ? HitChance.Medium : HitChance.High;
Killsteal();
// AutoCast();
{
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
Combo();
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ||
Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
{
LaneClear();
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
{
Harass();
}
//Auto Ignite
{
if (!ComboMenu["useignite"].Cast<CheckBox>().CurrentValue ||
!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
return;
foreach (
var source in
ObjectManager.Get<AIHeroClient>()
.Where(
a =>
a.IsEnemy && a.IsValidTarget(Ignite.Range) &&
a.Health < 50 + 20*Me.Level - (a.HPRegenRate/5*3)))
{
Ignite.Cast(source);
return;
}
}
//Auto Zhonias
var zhoniascheck = MiscMenu["zhonias"].Cast<CheckBox>().CurrentValue;
var zpercent = MiscMenu["ZPercent"].Cast<Slider>().CurrentValue;
var zhonias = new Item((int)ItemId.Zhonyas_Hourglass);
if (zhoniascheck && zhonias.IsReady())
{
if (Me.HealthPercent <= zpercent)
{
zhonias.Cast();
}
}
}
示例7: CastTitan
private static void CastTitan()
{
var id = ObjectManager.Player.InventoryItems.FirstOrDefault(a => a.Id == (ItemId) 3748);
if (id != null)
{
var HydraItem = new Item(id.Id, 300);
if (HydraItem.IsReady())
{
HydraItem.Cast();
Orbwalker.ResetAutoAttack();
}
}
}
示例8: OnAttack
public static void OnAttack(OnAttackArgs args)
{
var item = new Item(ItemId.Youmuus_Ghostblade, 0);
if ((PortAIO.OrbwalkerManager.isComboActive || OrbwalkerPassive || OrbwalkLastClickActive))
{
if (item.IsReady())
item.Cast();
}
}
示例9: Itens
private static void Itens()
{
var target = TargetSelector.GetTarget(500, DamageType.Physical);
var botrk = new Item((int)ItemId.Blade_of_the_Ruined_King, 600f);
var yommus = new Item((int)ItemId.Youmuus_Ghostblade);
var useEr = ComboMenu["useER"].Cast<CheckBox>().CurrentValue;
var erHealth = ComboMenu["ERHealth"].Cast<Slider>().CurrentValue;
var useYommus = ComboMenu["UseYommus"].Cast<CheckBox>().CurrentValue;
if (botrk.IsReady())
{
if (useEr && target.HealthPercent <= erHealth)
{
botrk.Cast(target);
}
}
if (yommus.IsReady() && useYommus)
{
yommus.Cast();
}
}
示例10: AutoPotion
private static void AutoPotion()
{
var usePotion = PotionMenu["hpPotion"].Cast<CheckBox>().CurrentValue;
var hpporcent = PotionMenu["hp%"].Cast<Slider>().CurrentValue;
var potionhp = new Item((int) ItemId.Health_Potion);
if (potionhp.IsReady() &&
usePotion && _Player.Health <= hpporcent)
{
potionhp.Cast();
}
}
示例11: 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();
}
}
}
示例12: Combo
private static void Combo()
{
if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
{
return;
}
var comboR = Menu.ComboMenu["Combo.R"].Cast<CheckBox>().CurrentValue;
if (comboR && Spells.R.IsReady() && !Player.Instance.IsDashing())
{
var targets =
EntityManager.Heroes.Enemies.Where(enemy => enemy != null && enemy.IsValidTarget(Spells.R.Range))
.ToList();
var rHp = Menu.ComboMenu["Combo.R.HP"].Cast<Slider>().CurrentValue;
var rCount = Menu.ComboMenu["Combo.R.Count"].Cast<Slider>().CurrentValue;
if ((targets.Count > 1 &&
targets.Any(target => target != null && target.Health < SpellSlot.R.GetDamage(target))) ||
targets.Any(target => target != null && target.HealthPercent < rHp) || targets.Count >= rCount)
{
Spells.R.Cast();
}
}
var comboE = Menu.ComboMenu["Combo.E"].Cast<CheckBox>().CurrentValue;
if (comboE && Spells.E.IsReady())
{
var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical);
if (target != null &&
(!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
{
Spells.E.Cast(target);
}
}
var comboHydra = Menu.ClearMenu["Combo.Hydra"].Cast<CheckBox>().CurrentValue;
if (comboHydra)
{
var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
var item = hydra.IsReady() ? hydra : tiamat;
var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
if ((Item.HasItem((int) ItemId.Ravenous_Hydra_Melee_Only, Player.Instance) ||
Item.HasItem((int) ItemId.Tiamat_Melee_Only, Player.Instance)) && item.IsReady() &&
target.Distance(Player.Instance) < item.Range - 80)
{
item.Cast();
}
}
}
示例13: Itens
private static void Itens()
{
var useEr = ItensMenu["useER"].Cast<CheckBox>().CurrentValue;
var hpPorcent = ItensMenu["hpPorcent"].Cast<Slider>().CurrentValue;
var mehpPorcent = ItensMenu["mehpPorcent"].Cast<Slider>().CurrentValue;
var useYommus = ItensMenu["useYommus"].Cast<CheckBox>().CurrentValue;
//itens
var botrk = new Item(ItemId.Blade_of_the_Ruined_King, 500);
var yommus = new Item(ItemId.Youmuus_Ghostblade);
if (botrk.IsReady() && useEr)
{
var targetEr = TargetSelector.GetTarget(botrk.Range, DamageType.Mixed);
if (targetEr.IsValidTarget(500) && hpPorcent >= targetEr.HealthPercent)
{
botrk.Cast();
}
if (Me.HealthPercent <= mehpPorcent)
{
botrk.Cast();
}
}
if (yommus.IsReady() && useYommus)
{
var targetY = TargetSelector.GetTarget(600, DamageType.Physical);
if (targetY.IsValidTarget(600))
{
yommus.Cast();
}
}
}
示例14: Potions
private static void Potions()
{
var usehp = PotionMenu["useHP"].Cast<CheckBox>().CurrentValue;
var hpbar = PotionMenu["hpbar"].Cast<Slider>().CurrentValue;
//potions instance
var hppot = new Item(ItemId.Health_Potion);
if (usehp && hppot.IsReady() && Me.HealthPercent <= hpbar)
{
hppot.Cast();
}
}
示例15: OnAttack
public static void OnAttack(AttackableUnit target, EventArgs args)
{
var item = new Item(ItemId.Youmuus_Ghostblade, 0);
if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || OrbwalkerPassive || OrbwalkLastClickActive))
{
if (item.IsReady())
item.Cast();
}
}