private void ObjAiBaseOnOnTarget(Obj_AI_Base sender, Obj_AI_BaseTargetEventArgs args) { if (sender is Obj_AI_Turret && sender.Distance(ObjectManager.Player) < 850 && args.Target is Obj_AI_Minion && args.Target.IsEnemy) { _lastTurretTarget = args.Target as Obj_AI_Minion; } }
private void Turret_OnTarget(Obj_AI_Base sender, Obj_AI_BaseTargetEventArgs args) { if (turretCache.ContainsKey(sender.NetworkId)) { turretTarget[sender.NetworkId] = args.Target; } }
private static void Turret_OnTarget(Obj_AI_Base sender, Obj_AI_BaseTargetEventArgs args) { if (sender.GetType() == typeof(Obj_AI_Turret)) { TurretHasAggro[sender.NetworkId] = !(args.Target == null || args.Target is Obj_AI_Minion); //Game.PrintChat("Turret with Index[" + sender.Index + "] has Aggro: " + (TurretHasAggro[sender.Index]? "yes" : "no")); } }
private void Obj_AI_Base_OnTarget(Obj_AI_Base sender, Obj_AI_BaseTargetEventArgs args) { if (sender == null || args.Target == null || !sender.IsAlly || !args.Target.IsEnemy || !sender.SkinName.ToLowerInvariant().Contains("turret") || !args.Target.Name.ToLowerInvariant().Contains("minion")) { return; } if (ObjectManager.Player.Distance(args.Target) <= q.Range) { turrent = sender; targetUnderTurret = new Obj_AI_Minion((ushort)args.Target.Index, (uint)args.Target.NetworkId);; } else { turrent = null; targetUnderTurret = null; } }
private void Obj_AI_Base_OnTarget(Obj_AI_Base sender, Obj_AI_BaseTargetEventArgs args) { if (sender == null || args.Target == null || !sender.IsAlly || !args.Target.IsEnemy || !sender.SkinName.ToLowerInvariant().Contains("turret") || !args.Target.Name.ToLowerInvariant().Contains("minion")) { return; } if (ObjectManager.Player.Distance(args.Target) <= q.Range) { turrent = sender; targetUnderTurret = new Obj_AI_Minion((ushort)args.Target.Index, (uint)args.Target.NetworkId); ; } else { turrent = null; targetUnderTurret = null; } }
private void Obj_AI_Turret_OnTarget(Obj_AI_Base sender, Obj_AI_BaseTargetEventArgs args) { if (sender == null || args.Target == null || !sender.IsAlly || !args.Target.IsEnemy || !sender.SkinName.ToLowerInvariant().Contains("turret") || !args.Target.Name.ToLowerInvariant().Contains("minion")) { return; } if (player.Distance(args.Target) <= player.AttackRange + player.BoundingRadius + args.Target.BoundingRadius) { var target = (Obj_AI_Minion)args.Target; var predictedHealth = HealthPrediction.GetHealthPrediction(target, (int)GetAATime(target), 500); if (predictedHealth > sender.GetAutoAttackDamage(target) + AutoAttackDamage(target) && predictedHealth < sender.GetAutoAttackDamage(target) * 2) { EnqueueAA(target); } } }