internal static void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (Player.IsDead) { return; } if (Player.Distance(args.End) > 1000) { return; } if (sender.IsMe) { return; } var HeroSender = sender as AIHeroClient; var Target = args.Target as AIHeroClient; if (HeroSender == null) { return; } if (HeroSender != null && Target != null && !Orbwalking.IsOnHit(args.SData.Name) && Target.IsAlly && !HeroSender.IsAlly && Target.Distance(Player.ServerPosition) <= 1000) { ShieldTarget = Target; AttackTime = Utils.GameTimeTickCount; } if (HeroSender != null && !Orbwalking.IsOnHit(args.SData.Name) && HeroManager.Allies.Where(x => x.Distance(args.End) <= 80 && x.Distance(Player.ServerPosition) <= 1000).Count() > 0) { ShieldTarget = HeroManager.Allies.Where(x => x.Distance(args.End) <= 80).FirstOrDefault(); AttackTime = Utils.GameTimeTickCount; } }