Ejemplo n.º 1
0
        private void UpdateConfig()
        {
            switch (ConfigType)
            {
            case ConfigType.FxCom:
                if (FxComConfig == null)
                {
                    Config = new FxComConfig();
                }
                break;

            case ConfigType.FxEnet:
                if (FxEnetConfig == null)
                {
                    Config = new FxEnetConfig();
                }
                break;

            case ConfigType.Q:
                if (QConfig == null)
                {
                    Config = new QConfig();
                }
                break;

            default:
                throw new NotSupportedException(ConfigType.ToString());
            }
        }
Ejemplo n.º 2
0
        public void GetSetXmlTest()
        {
            var config = new QConfig {
                Address       = "Address",
                Port          = 123,
                NetworkNumber = 234,
                PcNumber      = 21
            };
            var config2 = new QConfig();

            config2.SetXml(config.GetXml());
            string actual   = config.GetXml();
            string expected = config2.GetXml();

            Assert.That(actual, Is.EqualTo(expected));
        }
Ejemplo n.º 3
0
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            Chat.Print("<font color='#07667F'>Flipper's Morgana 1.1 Loaded Successfully</font> ");
            Chat.Print("<font color='#E11610'>Please Report Any Issues in the Thread.</font> ");


            if (User.ChampionName != "Morgana")
            {
                return;
            }
            Q = new Spell.Skillshot(spellSlot: SpellSlot.Q, spellRange: 1150, skillShotType: SkillShotType.Linear,
                                    castDelay: 250, spellSpeed: 1200, spellWidth: 70)
            {
                AllowedCollisionCount = 0
            };

            W = new Spell.Skillshot(spellSlot: SpellSlot.W, spellRange: 1000, skillShotType: SkillShotType.Circular,
                                    castDelay: 250, spellSpeed: 2200, spellWidth: 200)
            {
                AllowedCollisionCount = -1
            };

            E = new Spell.Targeted(SpellSlot.E, 800);

            R            = new Spell.Active(SpellSlot.R, 600);
            R.DamageType = DamageType.Magical;

            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);
            SpellList.Add(R);


            MorganaMenu       = MainMenu.AddMenu("Morgana", "Morgana");
            QConfig           = MorganaMenu.AddSubMenu("QConfig");
            WConfig           = MorganaMenu.AddSubMenu("WConfig");
            ComboMenu         = MorganaMenu.AddSubMenu("ComboMenu");
            HarassMenu        = MorganaMenu.AddSubMenu("HarassMenu");
            LaneClearMenu     = MorganaMenu.AddSubMenu("LaneClearMenu");
            SpellsToShield    = MorganaMenu.AddSubMenu("SpellsToShield");
            BlackShieldAllies = MorganaMenu.AddSubMenu("BlackShieldAllies");
            DrawingsMenu      = MorganaMenu.AddSubMenu("Drawings");
            AutoMenu          = MorganaMenu.AddSubMenu("AutoRConfig");



            ComboMenu.Add("Q", new CheckBox("Use Q"));
            ComboMenu.Add("W", new CheckBox("Use W"));
            ComboMenu.Add("E", new CheckBox("Use E"));
            ComboMenu.Add("R", new CheckBox("Use R"));
            ComboMenu.Add("SpamW", new CheckBox("Spam W even if target can move?"));
            HarassMenu.Add("Q", new CheckBox("Use Q"));
            HarassMenu.Add("W", new CheckBox("Use W"));
            HarassMenu.Add("SpamW", new CheckBox("Spam W even if target can move?"));
            LaneClearMenu.Add("W", new CheckBox("Use W on minions"));
            AutoMenu.Add("Rcount", new Slider("Use R If Hit Enemy ", 3, 1, 5));
            LaneClearMenu.Add("minionCount", new Slider("Use W if hit minions ", 3, 1, 5));

            foreach (var Spell in SpellList)
            {
                DrawingsMenu.Add(Spell.Slot.ToString(), new CheckBox("Draw " + Spell.Slot));
            }

            foreach (AIHeroClient client in EntityManager.Heroes.Enemies)
            {
                QConfig.Add(client.ChampionName, new CheckBox("Q Enabled on" + client.ChampionName));
                WConfig.Add(client.ChampionName, new CheckBox("W Enabled on" + client.ChampionName));
                foreach (SpellInfo info in SpellDatabase.SpellList)
                {
                    if (info.ChampionName == client.ChampionName)
                    {
                        EnemyProjectileInformation.Add(info);
                    }
                }
            }

            foreach (AIHeroClient client in EntityManager.Heroes.Allies)
            {
                BlackShieldAllies.Add(client.ChampionName, new CheckBox("Shield" + client.ChampionName));
            }

            foreach (SpellInfo spell in EnemyProjectileInformation)
            {
                Console.WriteLine(spell.SpellName);
                SpellsToShield.Add(spell.MissileName, new CheckBox("Shield" + spell.MissileName));
            }

            Game.OnTick                  += Game_OnTick;
            Game.OnUpdate                += GameOnUpdate;
            Drawing.OnDraw               += Drawing_OnDraw;
            GameObject.OnCreate          += OnCreate;
            GameObject.OnDelete          += OnDelete;
            Obj_AI_Base.OnUpdatePosition += OnUpdate;
        }