private static void OnAggro(AIBaseClient sender, AIBaseClientAggroEventArgs args) { if (!myhero.IsDead && sender.IsEnemy && !sender.IsMinion && args.TargetId == myhero.NetworkId) { gotAggro = true; } }
private static void AIHeroClient_OnAggro(AIBaseClient sender, AIBaseClientAggroEventArgs args) { if (sender.IsAlly && sender.IsMelee && isQ) { TimeCast = Variables.TickCount; CastedAndHit = true; } }
private static void AIHeroClient_OnAggro(AIBaseClient sender, AIBaseClientAggroEventArgs args) { if (sender.CharacterName == "TestCubeRender" && isQ) { TimeCast = Variables.TickCount; CastedAndHit = true; } }
/// <summary> /// Called when aggro is changed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The <see cref="EnsoulSharp.GameObjectAggroEventArgs" /> instance containing the event data. /// </param> private static void OnAIBaseClientAggro(AIBaseClient sender, AIBaseClientAggroEventArgs args) { if (!sender.IsEnemy) { return; } var hero = sender as AIHeroClient; var target = GameObjects.EnemyHeroes.FirstOrDefault(h => h.NetworkId == args.TargetId); if (hero != null && target != null) { AggroEntry aggro; if (PEntries.TryGetValue(hero.NetworkId, out aggro)) { aggro.Target = target; } else { PEntries[hero.NetworkId] = new AggroEntry(hero, target); } } }