private static void AfterAttack(AttackableUnit unit, AttackableUnit target) { var targ = target as Obj_AI_Base; if (!unit.IsMe || targ == null) { return; } Orbwalker.SetOrbwalkingPoint(Vector3.Zero); var mode = Orbwalker.ActiveMode; if (mode.Equals(Orbwalking.OrbwalkingMode.None) || mode.Equals(Orbwalking.OrbwalkingMode.LastHit) || mode.Equals(Orbwalking.OrbwalkingMode.LaneClear)) { return; } if (spells[Spells.Q].IsReady() && spells[Spells.Q].Cast()) { return; } if (IsActive("Combo.Use.items")) { ActiveModes.CastItems(targ); } }
private static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args) { var targ = args.Target as AIHeroClient; if (!args.Unit.IsMe || targ == null) { return; } if (!spells[Spells.Q].IsReady() || !spells[Spells.Q].IsReady() || !Orbwalker.ActiveMode.Equals(Orbwalking.OrbwalkingMode.Combo)) { return; } if (targ.Distance(Player) <= Orbwalking.GetRealAutoAttackRange(Player) - 10) { if (IsActive("Combo.Use.items")) { ActiveModes.CastItems(targ); } spells[Spells.Q].Cast(); } }