Esempio n. 1
0
        /// <summary>
        /// Invokes after attack event
        /// </summary>
        /// <param name="instance">Orbwalker instance</param>
        /// <param name="target">Target</param>
        /// <returns></returns>
        public static AfterAttackArgs FireAfterAttack(LSOrbwalker instance, AttackableUnit target)
        {
            if (instance != null)
            {
                instance.ForceTarget(null);
            }

            AfterAttackArgs args = new AfterAttackArgs();

            args.Instance = instance;
            args.Target   = target;

            if (AfterAttack != null)
            {
                AfterAttack(args);
            }

            if (args.ResetAATimer)
            {
                instance.ResetAutoAttackTimer();
                instance.reset = true;
            }

            return(args);
        }
Esempio n. 2
0
        /// <summary>
        /// Invokes before attack event
        /// </summary>
        /// <param name="instance">Orbwalker instance</param>
        /// <param name="target">Target</param>
        /// <returns></returns>
        public static BeforeAttackArgs FireBeforeAttack(LSOrbwalker instance, AttackableUnit target)
        {
            BeforeAttackArgs args = new BeforeAttackArgs();

            args.Instance = instance;
            args.Target   = target;

            if (BeforeAttack != null)
            {
                BeforeAttack(args);
            }

            return(args);
        }
Esempio n. 3
0
        /// <summary>
        /// Invokes on attack event
        /// </summary>
        /// <param name="instance">Orbwalker instance</param>
        /// <param name="target">Target</param>
        /// <returns></returns>
        public static OnAttackArgs FireOnAttack(LSOrbwalker instance, AttackableUnit target)
        {
            OnAttackArgs args = new OnAttackArgs();

            args.Instance = instance;
            args.Target   = target;

            if (OnAttack != null)
            {
                OnAttack(args);
            }

            if (args.Cancel)
            {
                EloBuddy.Player.IssueOrder(GameObjectOrder.Stop, ObjectManager.Player);
            }

            return(args);
        }