Esempio n. 1
0
        private static void FireReady(AttackableUnit unit, AttackableUnit target)
        {
            ReadyForSpellCastEventArgs args = new ReadyForSpellCastEventArgs
            {
                target = target,
                unit   = unit
            };

            if (OnReadyForSpellCast != null)
            {
                OnReadyForSpellCast(args);
            }
        }
Esempio n. 2
0
        private static void ReadyForSpellCastEvent(ReadyForSpellCastEventArgs args)
        {
            if (args.unit.IsMe)
            {
                Obj_AI_Hero target = (Obj_AI_Hero)args.target;
                if (target == null || target.IsValid <Obj_AI_Hero>())
                {
                    target = TargetSelector.GetTarget(m_fQRange, TargetSelector.DamageType.Physical);
                    if (target == null)
                    {
                        return;
                    }
                }

                switch (m_qfForm)
                {
                case QuinnForm.Human:
                    if (m_mMenu.SubMenu("combo").Item("enabled").GetValue <KeyBind>().Active)
                    {
                        ComboHuman(target);
                    }
                    else if (m_mMenu.SubMenu("harass").Item("enabled").GetValue <KeyBind>().Active)
                    {
                        Harass(target);
                    }
                    break;

                case QuinnForm.Bird:
                    if (m_mMenu.SubMenu("combo").Item("enabled").GetValue <KeyBind>().Active)
                    {
                        ComboBird(target);
                    }
                    break;
                }
            }
        }