예제 #1
0
        private static void OnDoCastDelayed(GameObjectProcessSpellCastEventArgs args)
        {
            AAPassive = false;
            if (args.Target is Obj_AI_Hero)
            {
                var target = (Obj_AI_Base)args.Target;
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && target.IsValid)
                {
                    if (ItemData.Youmuus_Ghostblade.GetItem().IsReady())
                    {
                        ItemData.Youmuus_Ghostblade.GetItem().Cast();
                    }
                    if (E.IsReady() && !AAPassive && CE == 0)
                    {
                        E.Cast((Deviation(Player.Position.To2D(), target.Position.To2D(), 65).To3D()));
                    }
                    if (E.IsReady() && !AAPassive && CE == 1)
                    {
                        E.Cast(Game.CursorPos);
                    }
                    if (E.IsReady() && !AAPassive && CE == 2)
                    {
                        E.Cast(Player.Position.Extend(target.Position, 50));
                    }
                    if (Q.IsReady() && (!E.IsReady() || (E.IsReady() && CE == 3)) && CQ && !AAPassive)
                    {
                        Q.Cast(target);
                    }
                    if ((!E.IsReady() || (E.IsReady() && CE == 3)) && (!Q.IsReady() || (Q.IsReady() && !CQ)) && CW && W.IsReady() && !AAPassive)
                    {
                        W.Cast(target.Position);
                    }
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && target.IsValid)
                {
                    if (Player.ManaPercent < HHMinMana)
                    {
                        return;
                    }

                    if (E.IsReady() && !AAPassive && HE == 0)
                    {
                        E.Cast((Deviation(Player.Position.To2D(), target.Position.To2D(), 65).To3D()));
                    }
                    if (E.IsReady() && !AAPassive && HE == 1)
                    {
                        E.Cast(Player.Position.Extend(Game.CursorPos, 50));
                    }
                    if (E.IsReady() && !AAPassive && HE == 2)
                    {
                        E.Cast(Player.Position.Extend(target.Position, 50));
                    }
                    if (Q.IsReady() && (!E.IsReady() || (E.IsReady() && HE == 3)) && HQ && !AAPassive)
                    {
                        Q.Cast(target);
                    }
                    if ((!E.IsReady() || (E.IsReady() && HE == 3)) && (!Q.IsReady() || (Q.IsReady() && !HQ)) && HW && W.IsReady() && !AAPassive)
                    {
                        W.Cast(target.Position);
                    }
                }
            }
            if (args.Target is Obj_AI_Minion && args.Target.IsValid)
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    var Mobs = MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(Player), MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                    if (Mobs[0].IsValid && Mobs.Count != 0)
                    {
                        if (E.IsReady() && !AAPassive && JE)
                        {
                            E.Cast(Player.Position.Extend(Game.CursorPos, 70));
                        }
                        if (Q.IsReady() && (!E.IsReady() || (E.IsReady() && !JE)) && JQ && !AAPassive)
                        {
                            Q.Cast(Mobs[0]);
                        }
                        if ((!E.IsReady() || (E.IsReady() && !JE)) && (!Q.IsReady() || (Q.IsReady() && !JQ)) && JW && W.IsReady() && !AAPassive)
                        {
                            W.Cast(Mobs[0].Position);
                        }
                    }
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Determines if a target is in auto attack range.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns><c>true</c> if a target is in auto attack range, <c>false</c> otherwise.</returns>
 public virtual bool InAutoAttackRange(AttackableUnit target)
 {
     return(Orbwalking.InAutoAttackRange(target));
 }