本文整理汇总了C#中Item.IsReady方法的典型用法代码示例。如果您正苦于以下问题:C# Item.IsReady方法的具体用法?C# Item.IsReady怎么用?C# Item.IsReady使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.IsReady方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public static void Execute()
{
if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
{
return;
}
if (Menu.Harass.E && Spells.E.IsReady())
{
var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical, Player.Instance.Position);
if (target != null &&
(!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
{
Utility.Debug(string.Format("Used E on {0} (Harass Mode).", target.Name));
Spells.E.Cast(target);
}
}
if (Menu.Harass.Hydra)
{
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(hydra.Id, Player.Instance) ||
Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
target.Distance(Player.Instance) < item.Range - 80)
{
Utility.Debug("Used Hydra/Tiamat (Harass Mode).");
item.Cast();
}
}
}
示例2: Execute
public static void Execute()
{
if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
{
return;
}
if (Menu.Combo.R && Spells.R.IsReady() && !Player.Instance.IsDashing())
{
var targets =
EntityManager.Heroes.Enemies.Where(enemy => enemy != null && enemy.IsValidTarget(Spells.R.Range))
.ToList();
if ((targets.Count > 1 &&
targets.Any(target => target != null && target.Health < Damages.Spell.R.GetDamage(target))) ||
targets.Any(target => target != null && target.HealthPercent < Menu.Combo.RHp) ||
targets.Count >= Menu.Combo.RCount)
{
Utility.Debug(string.Format("Used R (Combo Mode) [Targets Count: {0}].", targets.Count));
Spells.R.Cast();
}
}
if (Menu.Combo.E && Spells.E.IsReady())
{
var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical);
if (target != null &&
(!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
{
Utility.Debug(string.Format("Used E on {0} (Combo Mode).", target.Name));
Spells.E.Cast(target);
}
}
if (Menu.Combo.Hydra)
{
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(hydra.Id, Player.Instance) ||
Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
target.Distance(Player.Instance) < item.Range - 80)
{
Utility.Debug("Used Hydra/Tiamat (Combo Mode).");
item.Cast();
}
}
}
示例3: Execute
public static void Execute()
{
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);
var objAiMinions = minionObj as Obj_AI_Minion[] ?? minionObj.ToArray();
if (!objAiMinions.Any())
{
return;
}
if (Menu.Clear.E && Spells.E.IsReady())
{
var obj = objAiMinions.FirstOrDefault(minion => minion.Health < Damages.Spell.E.GetDamage(minion));
if (obj == null && !objAiMinions.Any(minion => Player.Instance.IsInAutoAttackRange(minion)))
{
obj = objAiMinions.MinOrDefault(minion => minion.Health);
}
if (obj != null)
{
Utility.Debug(string.Format("Used E on {0} (Lane/Jungle Clear Mode).", obj.Name));
Spells.E.Cast(obj);
}
}
if (Menu.Clear.Hydra)
{
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(hydra.Id, Player.Instance) ||
Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
(objAiMinions.Count(i => item.IsInRange(i)) > 2 ||
objAiMinions.Any(i => i.MaxHealth >= 1200 && i.Distance(Player.Instance) < item.Range - 80)))
{
Utility.Debug("Used Hydra/Tiamat (Lane/Jungle Clear Mode).");
item.Cast();
}
}
}
示例4: CastItem
public static void CastItem()
{
var tiamat = new Item(ItemId.Tiamat_Melee_Only);
var hydra = new Item(ItemId.Ravenous_Hydra_Melee_Only);
if (tiamat.IsReady())
tiamat.Cast();
if (hydra.IsReady())
hydra.Cast();
if (Items.CanUseItem(3748))
Items.UseItem(3748);
}
示例5: HasItem
public static bool HasItem()
{
var tiamat = new Item(ItemId.Tiamat_Melee_Only);
var hydra = new Item(ItemId.Ravenous_Hydra_Melee_Only);
if (tiamat.IsReady() || hydra.IsReady() || Items.CanUseItem(3748))
{
return true;
}
else
{
return false;
}
}
示例6: GetRealDamage
public static float GetRealDamage(this SpellSlot slot, Obj_AI_Base target)
{
// Helpers
var spellLevel = Player.Instance.Spellbook.GetSpell(slot).Level;
const DamageType damageType = DamageType.Magical;
float damage = 0;
// Validate spell level
if (spellLevel == 0)
{
return 0;
}
spellLevel--;
switch (slot)
{
case SpellSlot.Q:
var sheen = new Item(ItemId.Sheen);
var trinity = new Item(ItemId.Trinity_Force);
var ice = new Item(ItemId.Iceborn_Gauntlet);
if (sheen.IsOwned() && sheen.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
}
else if (sheen.IsOwned() && sheen.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
}
else if (trinity.IsOwned() && trinity.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 2f * Player.Instance.FlatPhysicalDamageMod;
}
else if (ice.IsOwned() && ice.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1.25f * Player.Instance.FlatPhysicalDamageMod;
}
else
{
damage = new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod;
}
break;
case SpellSlot.W:
damage = new float[] { 70, 115, 160, 205, 250 }[spellLevel] + 0.80f * Player.Instance.FlatMagicDamageMod;
break;
case SpellSlot.E:
damage = new float[] { 75, 125, 175, 225, 275 }[spellLevel] + 0.75f * Player.Instance.FlatMagicDamageMod + 0.5f * Player.Instance.FlatPhysicalDamageMod;
break;
case SpellSlot.R:
damage = new float[] { 350, 500, 650 }[spellLevel] + 0.9f * Player.Instance.FlatMagicDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
break;
}
if (damage <= 0)
{
return 0;
}
return Player.Instance.CalculateDamageOnUnit(target, damageType, damage) - 20;
}