예제 #1
0
 private void OnOrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     try
     {
         if (args.Unit.IsMe)
         {
             if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
             {
                 var enemy = args.Target as Obj_AI_Hero;
                 if (enemy != null)
                 {
                     ItemManager.Muramana(enemy, true);
                 }
             }
             else
             {
                 ItemManager.Muramana(null, false);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
예제 #2
0
        private void OnOrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            try
            {
                if (!args.Unit.IsMe)
                {
                    return;
                }

                if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                     Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) && args.Target is Obj_AI_Minion)
                {
                    args.Process = args.Target.NetworkId != _lastFarmQKill;
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
예제 #3
0
        private void OnOrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            try
            {
                if (!args.Unit.IsMe)
                {
                    return;
                }
                var t = args.Target as Obj_AI_Hero;
                if (t != null &&
                    (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
                     Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed))
                {
                    args.Process =
                        Menu.Item(
                            Menu.Name + "." +
                            (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ? "combo" : "harass") + ".aa")
                        .GetValue <bool>();
                    if (!args.Process)
                    {
                        var poison = GetPoisonBuffEndTime(t);
                        args.Process = (!Q.IsReady() || Q.Instance.ManaCost > Player.Mana) &&
                                       ((!E.IsReady() && Game.Time - _lastECast > 3) ||
                                        E.Instance.ManaCost > Player.Mana || poison <= 0 || poison < E.ArrivalTime(t));
                    }
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    var mode = args.Target.Team == GameObjectTeam.Neutral ? "jungle-clear" : "lane-clear";
                    args.Process = Menu.Item(Menu.Name + "." + mode + ".aa").GetValue <bool>();
                    if (!args.Process)
                    {
                        var m = args.Target as Obj_AI_Minion;
                        if (m != null && (_lastEEndTime < Game.Time || E.IsReady()) ||
                            GetPoisonBuffEndTime(m) < E.ArrivalTime(m) || E.Instance.ManaCost > Player.Mana ||
                            !ResourceManager.Check(mode))
                        {
                            args.Process = true;
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit)
                {
                    var m = args.Target as Obj_AI_Minion;
                    if (m != null && E.IsReady() && E.CanCast(m) && E.Instance.ManaCost < Player.Mana)
                    {
                        var useE       = Menu.Item(Menu.Name + ".lasthit.e").GetValue <bool>();
                        var useEPoison = Menu.Item(Menu.Name + ".lasthit.e-poison").GetValue <bool>();
                        if ((useE || useEPoison && GetPoisonBuffEndTime(m) > E.ArrivalTime(m)) &&
                            ResourceManager.Check("lasthit"))
                        {
                            args.Process = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }