本文整理汇总了C#中AIHeroClient.PredictedHealth方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.PredictedHealth方法的具体用法?C# AIHeroClient.PredictedHealth怎么用?C# AIHeroClient.PredictedHealth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.PredictedHealth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShieldItems
public static bool ShieldItems(AIHeroClient ally)
{
if (ally == null || ally.IsDead || ally.Health <= 0 || !ally.IsValid) return false;
var predHp = ally.PredictedHealth();
if (ally.IsMe && Defence.DefenceMenu["Archangels_Staff"].Cast<CheckBox>().CurrentValue && predHp + ShieldHeals[ItemId.Archangels_Staff].Invoke() > 0) // Seraphs
{
if (Archangles != null && Archangles.CanUseItem())
{
Player.CastSpell(Archangles.SpellSlot);
Defence.LastSpellCast = Environment.TickCount + 250;
return true;
}
}
if (Defence.DefenceMenu["Locket_of_the_Iron_Solari"].Cast<CheckBox>().CurrentValue && (ally.IsMe && Defence.DefenceMenu["Locket_of_the_Iron_Solari_self"].Cast<CheckBox>().CurrentValue || !ally.IsMe && Defence.DefenceMenu["Locket_of_the_Iron_Solari_ally"].Cast<CheckBox>().CurrentValue) && predHp + ShieldHeals[ItemId.Locket_of_the_Iron_Solari].Invoke() > 0 && ally.Distance(Player.Instance) < 600) // Locket
{
if (Locket != null && Locket.CanUseItem())
{
Player.CastSpell(Locket.SpellSlot);
Defence.LastSpellCast = Environment.TickCount + 250;
return true;
}
}
if (Defence.DefenceMenu["Face_of_the_Mountain"].Cast<CheckBox>().CurrentValue && (ally.IsMe && Defence.DefenceMenu["Face_of_the_Mountain_self"].Cast<CheckBox>().CurrentValue || !ally.IsMe) && predHp + ShieldHeals[ItemId.Face_of_the_Mountain].Invoke() > 0 && ally.Distance(Player.Instance) < 700) // FOM
{
if (FaceOfTheMountain != null && FaceOfTheMountain.CanUseItem())
{
Player.CastSpell(FaceOfTheMountain.SpellSlot, ally);
Defence.LastSpellCast = Environment.TickCount + 250;
return true;
}
}
if (Defence.DefenceMenu["Mikaels_Crucible_Heal"].Cast<CheckBox>().CurrentValue && Mikaels != null && Mikaels.CanUseItem() && predHp + (150 + (0.1 * ally.Health)) > 0 && ally.Distance(Player.Instance) < 750) // Mikaels
{
Player.CastSpell(Mikaels.SpellSlot, ally);
Defence.LastSpellCast = Environment.TickCount + 250;
return true;
}
return false;
}