本文整理汇总了C#中LeagueSharp.Common.Items.Item.IsInRange方法的典型用法代码示例。如果您正苦于以下问题:C# Items.Item.IsInRange方法的具体用法?C# Items.Item.IsInRange怎么用?C# Items.Item.IsInRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeagueSharp.Common.Items.Item
的用法示例。
在下文中一共展示了Items.Item.IsInRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
}
}
}