Esempio n. 1
0
        public static void OnAfterAttack(AttackableUnit target, EventArgs args)
        {
            if (target != null && (!target.IsValid || target.IsDead))
            {
                return;
            }

            var orbwalkermode = Orbwalker.ActiveModesFlags;

            if (orbwalkermode == Orbwalker.ActiveModes.Combo)
            {
                if (Misc.isChecked(ComboMenu, "comboQ") && Q.IsReady() && !Misc.isChecked(ComboMenu, "qsQUsage") && _Player.Distance(_target.Position) < (_Player.GetAutoAttackRange() + Q.Range))
                {
                    if (Misc.isChecked(ComboMenu, "qsQDirection"))
                    {
                        if (target != null)
                        {
                            Q.Cast(target.Position);
                        }
                    }
                    else
                    {
                        Player.CastSpell(SpellSlot.Q, Game.CursorPos);
                    }
                }
            }
        }
Esempio n. 2
0
 public static bool TryToCast(this Spell.Ranged spell, Obj_AI_Base target, Menu m)
 {
     if (target == null)
     {
         return(false);
     }
     return(target.CanCast(spell, m) && spell.Cast(target));
 }
Esempio n. 3
0
 /// <summary>
 /// It will only cast the spell if it can
 /// </summary>
 /// <param name="spell">Active Spell</param>
 /// <param name="target">Target to cast the spell</param>
 public static bool TryCast(this Spell.Ranged spell, Obj_AI_Base target)
 {
     if (spell != null)
     {
         if (target.CanCast(spell))
         {
             return(spell.Cast(target));
         }
     }
     return(false);
 }
Esempio n. 4
0
 public static bool TryToCast(this Spell.Ranged spell, Obj_AI_Base target, Menu m)
 {
     if (target == null)
     {
         return(false);
     }
     return(target.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower()) && spell.Cast(target));
 }