protected override void OrbwalkingEvents_BeforeAttack(SCommon.Orbwalking.BeforeAttackArgs args) { if (args.Target is AIHeroClient) { if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Combo) { if (Spells[W].IsReady() && ComboUseW) { Spells[W].Cast(); } } else if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Mixed || HarassToggle) { if (Spells[W].IsReady() && HarassUseW) { Spells[W].Cast(); } } } else if (args.Target is Obj_AI_Minion) { if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.LaneClear) { if (Spells[W].IsReady() && LaneClearUseW) { Spells[W].Cast(); } } } }
/// <summary> /// Invokes before attack event /// </summary> /// <param name="instance">Orbwalker instance</param> /// <param name="target">Target</param> /// <returns></returns> public static BeforeAttackArgs FireBeforeAttack(Orbwalker instance, AttackableUnit target) { BeforeAttackArgs args = new BeforeAttackArgs(); args.Instance = instance; args.Target = target; if (BeforeAttack != null) BeforeAttack(args); return args; }
/// <summary> /// Orbwalk itself /// </summary> /// <param name="target">Target</param> /// <param name="point">Orbwalk point</param> public void Orbwalk(AttackableUnit target, Vector3 point) { if (!m_attackInProgress) { if (CanOrbwalkTarget(target)) { if (CanAttack()) { BeforeAttackArgs args = Events.FireBeforeAttack(this, target); if (args.Process) { if (!m_Configuration.DisableAA || target.Type != GameObjectType.obj_AI_Hero) { Attack(target); } } else { if (CanMove()) { if (m_Configuration.DontMoveInRange && target.Type == GameObjectType.obj_AI_Hero) { return; } if ((m_Configuration.LegitMode && !ObjectManager.Player.IsMelee) || !m_Configuration.LegitMode) { Move(point); } } } } else if (CanMove()) { if (m_Configuration.DontMoveInRange && target.Type == GameObjectType.obj_AI_Hero) { return; } if ((m_Configuration.LegitMode && !ObjectManager.Player.IsMelee) || !m_Configuration.LegitMode) { Move(point); } } } else { Move(point); } } }
/// <summary> /// Invokes before attack event /// </summary> /// <param name="instance">Orbwalker instance</param> /// <param name="target">Target</param> /// <returns></returns> public static BeforeAttackArgs FireBeforeAttack(Orbwalker instance, AttackableUnit target) { BeforeAttackArgs args = new BeforeAttackArgs(); args.Instance = instance; args.Target = target; if (BeforeAttack != null) { BeforeAttack(args); } return(args); }
protected override void OrbwalkingEvents_BeforeAttack(SCommon.Orbwalking.BeforeAttackArgs args) { if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Mixed) { if (Spells[E].IsReady() && HarassUseE) { Spells[E].Cast(); args.Process = false; return; } } if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Combo) { if (Spells[E].IsReady() && ComboUseE) { Spells[E].Cast(); args.Process = false; return; } } }