The orbwalker.
Inheritance: AttackAnimationTracker
Exemple #1
0
 private static Orbwalker OrbWalkManager(Hero me)
 {
     Orbwalker orb;
     var handle = me.Handle;
     if (Orbwalkers.TryGetValue(handle, out orb)) return orb;
     orb = new Orbwalker(me);
     Orbwalkers.Add(handle, orb);
     return orb;
 }
Exemple #2
0
        public void OnLoad()
        {
            hero = ObjectManager.LocalHero;
            menuManager = new MenuManager(hero.Name);
            treeFactory = new TreeFactory();
            orbwalker = new Orbwalker(hero);
            sleeper = new MultiSleeper();

            TimberPrediction.OnLoad();

            whirlingDeath = new WhirlingDeath(hero.Spellbook.SpellQ);
            timberChain = new TimberChain(hero.Spellbook.SpellW);

            chakrams.Add(
                new Chakram(
                    hero.Spellbook.Spells.First(x => x.Name == "shredder_chakram"),
                    hero.Spellbook.Spells.First(x => x.Name == "shredder_return_chakram")));
        }
        /// <summary>
        ///     The events_ on close.
        /// </summary>
        /// <param name="sender">
        ///     The sender.
        /// </param>
        /// <param name="e">
        ///     The e.
        /// </param>
        private static void Events_OnClose(object sender, EventArgs e)
        {
            if (!loaded)
            {
                return;
            }

            menu.Items.Remove(menu.Items.FirstOrDefault(x => x.Name == ObjectManager.LocalHero?.Name + "Common.Orbwalking.UserDelay"));
            orbwalker = null;
            loaded = false;
        }
Exemple #4
0
        private static void OnLoad(object o, EventArgs e)
        {
            hero = ObjectManager.LocalHero;
            sleeper = new Sleeper();
            orbwalker = new Orbwalker(hero);
            heroTeam = hero.Team;

            Game.OnIngameUpdate += GameOnIngameUpdate;
            Drawing.OnDraw += DrawingOnDraw;
            Player.OnExecuteOrder += PlayerOnExecuteOrder;
        }
        /// <summary>
        ///     The events_ on load.
        /// </summary>
        /// <param name="sender">
        ///     The sender.
        /// </param>
        /// <param name="e">
        ///     The e.
        /// </param>
        public static void Events_OnLoad(object sender, EventArgs e)
        {
            if (loaded || !Game.IsInGame || ObjectManager.LocalHero == null || !ObjectManager.LocalHero.IsValid)
            {
                return;
            }

            if (orbwalker != null)
            {
                orbwalker.Unit = ObjectManager.LocalHero;
            }

            if (menu == null)
            {
                menu = Menu.Menu.Root.AddSubMenu(new Menu.Menu("Orbwalking", "Common.Orbwalking"));
                var enableDebugMenuItem = menu.AddItem(new MenuItem("common.orbwalking.debug", "Debug").SetValue(false));
                orbwalker = new Orbwalker(ObjectManager.LocalHero);
                enableDebugMenuItem.ValueChanged += EnableDebugMenuItem_ValueChanged;
            }

            var userDelayMenuItem =
                menu.AddItem(
                    new MenuItem("Common.Orbwalking.UserDelay", "Attack cancel delay", true).SetValue(
                        new Slider(0, -200, 200)));
            UserDelay = userDelayMenuItem.GetValue<Slider>().Value;
            userDelayMenuItem.ValueChanged += (o, args) => { UserDelay = args.GetNewValue<Slider>().Value; };
            loaded = true;
        }