Exemple #1
0
        public static void setupARMASimulator()
        {
            GameObject.OnCreate += TowerAttackOnCreate;
            GameObject.OnDelete += onDelete;

            foreach (var tur in ObjectManager.Get <Obj_HQ>())
            {
                if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Chaos)
                {
                    fromNex = tur;
                }
                if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Order)
                {
                    toNex = tur;
                }

                if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Order)
                {
                    fromNex = tur;
                }

                if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Chaos)
                {
                    toNex = tur;
                }
            }

            if (fromNex == null)
            {
                return;
            }
            float sep = fromNex.Position.Distance(toNex.Position) / 40;

            Vector2 lastPos = fromNex.Position.To2D();

            //Setup sectors
            for (int i = 0; i < 40; i++)
            {
                Vector2 end = lastPos.Extend(toNex.Position.To2D(), sep);
                sectors.Add(new Sector(lastPos, end, 750));
                lastPos = end;
            }
            MapControl.setupMapControl();
            AutoLevelChamp.setAutoLevel();
            AutoShopper.init();
            setUpItems();
            setChamp();
            AutoShopper.setBuild(champBuild);
            //checkItems();
            sSpells = new SummonerSpells();
            if (champ != null)
            {
                champ.setUpSpells();
            }

            DeathWalker.CustomRunCS     = (player.IsMelee) ? 250 : 150;
            DeathWalker.CustomMoveDelay = 324;
            DeathWalker.BottingMode     = true;
        }
        public static void setupARMASimulator()
        {
            try
            {
                GameObject.OnCreate += TowerAttackOnCreate;
                if (ObjectManager.Player.Hero != EloBuddy.Champion.Corki)
                {
                    GameObject.OnDelete += onDelete;
                }

                foreach (var tur in ObjectManager.Get <Obj_HQ>())
                {
                    if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Chaos)
                    {
                        fromNex = tur;
                    }
                    if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Order)
                    {
                        toNex = tur;
                    }

                    if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Order)
                    {
                        fromNex = tur;
                    }

                    if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Chaos)
                    {
                        toNex = tur;
                    }
                }

                if (fromNex == null)
                {
                    return;
                }
                float sep = fromNex.Position.Distance(toNex.Position) / 40;

                Vector2 lastPos = fromNex.Position.To2D();
                //Setup sectors
                for (int i = 0; i < 40; i++)
                {
                    Vector2 end = lastPos.Extend(toNex.Position.To2D(), sep);
                    sectors.Add(new Sector(lastPos, end, 750));
                    lastPos = end;
                }
                MapControl.setupMapControl();
                AutoLevelChamp.setAutoLevel();
                AutoShopper.init();
                setUpItems();
                setChamp();
                AutoShopper.setBuild(champBuild);

                sSpells = new SummonerSpells();
                if (champ != null)
                {
                    champ.setUpSpells();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }