Example #1
0
        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);
                    EloBuddy.SDK.Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80);
                }
            }
        }
Example #2
0
 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);
             EloBuddy.SDK.Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80);
         }
     }
 }