private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args) { var PacketCast = getCheckBoxItem(SkyLv_Taric.Misc, "Taric.UsePacketCast"); if (Player.LSIsRecalling()) { return; } if (getCheckBoxItem(SkyLv_Taric.Misc, "Taric.AutoEInterrupt") && E.IsReady() && sender.LSIsValidTarget(E.Range)) { E.Cast(sender, PacketCast); } if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseEFromAlly") && E.IsReady() && Player.Mana >= E.ManaCost) { foreach (var AllyHero in ObjectManager.Get <AIHeroClient>().Where(a => !a.IsMe && !a.IsDead && a.Team == ObjectManager.Player.Team && Player.LSDistance(a) < 1600 && (a.HasBuff("TaricWAllyBuff") || a.HasBuff("TaricW")))) { var Allytarget = ObjectManager.Get <AIHeroClient>().Where(t => !t.IsDead && t.Team != ObjectManager.Player.Team && AllyHero.LSDistance(t) < E.Range).FirstOrDefault(); if (getCheckBoxItem(SkyLv_Taric.Combo, AllyHero.NetworkId + "TargetInterruptEComboFromAlly") && Allytarget.NetworkId == sender.NetworkId) { E.Cast(sender.ServerPosition, PacketCast); return; } } } }
static void Unit_OnDash(Obj_AI_Base sender, Dash.DashItem args) { var target = TargetSelector.GetTarget(E.Range * 2, DamageType.Magical); var PacketCast = getCheckBoxItem(SkyLv_Taric.Misc, "Taric.UsePacketCast"); var td = sender as AIHeroClient; if (!td.IsEnemy || td == null || Player.IsRecalling()) { return; } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (sender.NetworkId == target.NetworkId) { if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.EOnDashendPosition") && E.IsReady() && Player.LSDistance(args.EndPos) < E.Range) { var delay = (int)(args.EndTick - Game.Time - E.Delay - 0.1f); if (delay > 0) { LeagueSharp.Common.Utility.DelayAction.Add(delay * 1000, () => E.Cast(args.EndPos, PacketCast)); } else { E.Cast(args.EndPos, PacketCast); } } } if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseEFromAlly") && E.IsReady() && Player.Mana >= E.ManaCost) { foreach (var AllyHero in ObjectManager.Get <AIHeroClient>().Where(a => !a.IsMe && a.IsDead && a.Team == ObjectManager.Player.Team && Player.LSDistance(a) < 1600 && (a.HasBuff("TaricWAllyBuff") || a.HasBuff("TaricW")))) { var Allytarget = ObjectManager.Get <AIHeroClient>().Where(t => !t.IsDead && t.Team != ObjectManager.Player.Team && AllyHero.LSDistance(args.EndPos) < E.Range).FirstOrDefault(); if (sender.NetworkId == Allytarget.NetworkId) { if (getCheckBoxItem(SkyLv_Taric.Combo, AllyHero.NetworkId + "TargetDashEPEComboFromAlly")) { var delay = (int)(args.EndTick - Game.Time - E.Delay - 0.1f); if (delay > 0) { LeagueSharp.Common.Utility.DelayAction.Add(delay * 1000, () => E.Cast(args.EndPos, PacketCast)); } else { E.Cast(args.EndPos, PacketCast); } } } } } } }