private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { var target = args.Target as Obj_AI_Base; var senderHero = sender as AIHeroClient; if (args.IsAutoAttack()) { return; } if (senderHero != null && senderHero.IsEnemy) { if (target != null && target.IsAlly) { var targettedSpell = new TargetSpell(target, senderHero, senderHero.Hero, args.Slot); TargettedSpells.Add(targettedSpell); Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80); } if (target == null) { var notMissile = new NotMissile(args.Start, args.End, senderHero, senderHero.Hero, args.Slot, args.SData.Name); NotMissiles.Add(notMissile); Core.DelayAction(() => NotMissiles.Remove(notMissile), 80); } } }
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { var target = args.Target as Obj_AI_Base; var senderHero = sender as AIHeroClient; if (args.IsAutoAttack()) return; if (senderHero != null && senderHero.IsEnemy) { if (target != null && target.IsAlly) { var targettedSpell = new TargetSpell(target, senderHero, senderHero.Hero, args.Slot); TargettedSpells.Add(targettedSpell); Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80); } } }