Ejemplo n.º 1
0
        private static void Game_OnTick(EventArgs args)
        {
            if (AddonDisabler.CanDisable)
            {
                Game.OnTick -= Game_OnTick;
            }

            if (Helper.Me.IsDead)
            {
                return;
            }

            if (Active.CanRun())
            {
                Active.Execute();
            }

            if (!SpellManager.Q.IsReady() && !SpellManager.W.IsReady() && !SpellManager.E.IsReady() && !SpellManager.R.IsReady())
            {
                return;
            }

            foreach (var mode in Modes.Where(m => m.CanRun()))
            {
                try
                {
                    mode.Execute();
                }
                catch (Exception e)
                {
                    Logger.Error("Error in mode [{0}] \n {1}", mode.GetType().Name, e);
                }
            }
        }
Ejemplo n.º 2
0
        private static void Game_OnTick(EventArgs args)
        {
            if (Me.IsDead)
            {
                return;
            }

            Active.Execute();

            if (!Q.IsReady() && !W.IsReady() && !E.IsReady() && !R.IsReady())
            {
                return;
            }

            foreach (var mode in Modes.Where(m => m.CanRun()))
            {
                try
                {
                    mode.Execute();
                }
                catch (Exception e)
                {
                    Logger.Error("Error in mode [{0}] \n {1}", mode.GetType().Name, e);
                }
            }
        }
Ejemplo n.º 3
0
        private static void Game_OnTick(EventArgs args)
        {
            if (!SandboxConfig.IsBuddy)
            {
                Chat.Print("Sorry you are not buddy :(", Color.Purple);
                Game.OnTick -= Game_OnTick;
                return;
            }

            if (AddonDisabler.CanDisable)
            {
                Game.OnTick -= Game_OnTick;
            }

            if (Me.IsDead)
            {
                return;
            }

            if (Active.CanRun())
            {
                Active.Execute();
            }

            if (!Q.IsReady() && !W.IsReady() && !E.IsReady() && !R.IsReady())
            {
                return;
            }

            foreach (var mode in Modes.Where(m => m.CanRun()))
            {
                try
                {
                    mode.Execute();
                }
                catch (Exception e)
                {
                    Logger.Error("Error in mode [{0}] \n {1}", mode.GetType().Name, e);
                }
            }
        }