示例#1
0
        protected override void OnActivate()
        {
            try
            {
                Hotkey = new HotkeySelector(Key.None, OnHotkeyPressed);
                menuManager.Value.RegisterMenu(this);

                var data = Ability.GetAbilityDataById(AbilityId.item_blink);
                if (data != null)
                {
                    var entry = data.AbilitySpecialData.FirstOrDefault(x => x.Name == "blink_range");
                    if (entry != null)
                    {
                        blinkRange = entry.Value - 1.0f;
                    }
                    else
                    {
                        Log.Info("can't find blink_range entry");
                    }
                }
                else
                {
                    Log.Info($"can't find ability data for {AbilityId.item_blink}");
                }

                UpdateManager.Subscribe(OnUpdate, 500);
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
示例#2
0
        public MainCombo()
        {
            Config._Renderer.TextureManager.LoadFromDota("rubick_telekinesis", "resource\\flash3\\images\\spellicons\\rubick_telekinesis.png");
            Config._Renderer.TextureManager.LoadFromDota("rubick_fade_bolt", "resource\\flash3\\images\\spellicons\\rubick_fade_bolt.png");

            Use = new ImageToggler(true, new[] { "rubick_telekinesis", "rubick_fade_bolt" });

            ComboKey = new HotkeySelector(Key.G, KeyPressed, HotkeyFlags.Down | HotkeyFlags.Up);
        }
示例#3
0
文件: Menu.cs 项目: squuall123/Ensage
        public Menu()
        {
            Drawings = new DrawingsMenu();
            Hotkey   = new HotkeySelector(Key.D, HotkeyPressed, HotkeyFlags.Down | HotkeyFlags.Up);

            LinkenSave   = new LinkenSave();
            GlimmerSave  = new LinkenSave();
            LotusSave    = new LotusSave();
            GlimmerCUlts = new GlimmerCUlts();
        }
示例#4
0
文件: Menu.cs 项目: squuall123/Ensage
        public LinkenSave()
        {
            List <String> _Names = new List <String>();

            foreach (var H in EntityManager <Hero> .Entities.Where(x => x.Team != Config._Hero.Team))
            {
                var _S1 = H.Spellbook.SpellQ;
                var _S2 = H.Spellbook.SpellW;
                var _S3 = H.Spellbook.SpellE;
                var _S4 = H.Spellbook.SpellR;

                if (AbilityStorage._LowSkills.Any(x => x.Id == _S1.Id) ||
                    AbilityStorage._MediumSkills.Any(x => x.Id == _S1.Id) ||
                    AbilityStorage._DangerSkills.Any(x => x.Id == _S1.Id) ||
                    AbilityStorage._UltSkills.Any(x => x.Id == _S1.Id)
                    )
                {
                    _Names.Add(_S1.Name);
                    Config._Renderer.TextureManager.LoadFromDota(_S1.Name, $"resource\\flash3\\images\\spellicons\\{_S1.TextureName}.png");
                }
                if (AbilityStorage._LowSkills.Any(x => x.Id == _S2.Id) ||
                    AbilityStorage._MediumSkills.Any(x => x.Id == _S2.Id) ||
                    AbilityStorage._DangerSkills.Any(x => x.Id == _S2.Id) ||
                    AbilityStorage._UltSkills.Any(x => x.Id == _S2.Id)
                    )
                {
                    _Names.Add(_S2.Name);
                    Config._Renderer.TextureManager.LoadFromDota(_S2.Name, $"resource\\flash3\\images\\spellicons\\{_S2.TextureName}.png");
                }
                if (AbilityStorage._LowSkills.Any(x => x.Id == _S3.Id) ||
                    AbilityStorage._MediumSkills.Any(x => x.Id == _S3.Id) ||
                    AbilityStorage._DangerSkills.Any(x => x.Id == _S3.Id) ||
                    AbilityStorage._UltSkills.Any(x => x.Id == _S3.Id)
                    )
                {
                    _Names.Add(_S3.Name);
                    Config._Renderer.TextureManager.LoadFromDota(_S3.Name, $"resource\\flash3\\images\\spellicons\\{_S3.TextureName}.png");
                }
                if (AbilityStorage._LowSkills.Any(x => x.Id == _S4.Id) ||
                    AbilityStorage._MediumSkills.Any(x => x.Id == _S4.Id) ||
                    AbilityStorage._DangerSkills.Any(x => x.Id == _S4.Id) ||
                    AbilityStorage._UltSkills.Any(x => x.Id == _S4.Id)
                    )
                {
                    _Names.Add(_S4.Name);
                    Config._Renderer.TextureManager.LoadFromDota(_S4.Name, $"resource\\flash3\\images\\spellicons\\{_S4.TextureName}.png");
                }
            }

            SaveFromKeys = _Names.ToArray();
            SaveFrom     = new ImageToggler(true, SaveFromKeys);

            Savekey   = new HotkeySelector(Key.L, SavekeyPressed, HotkeyFlags.Down | HotkeyFlags.Up);
            Togglekey = new HotkeySelector(Key.K, TogglekeyPressed, HotkeyFlags.Up);
        }
示例#5
0
文件: Menu.cs 项目: squuall123/Ensage
        public GlimmerCUlts()
        {
            Config._Renderer.TextureManager.LoadFromDota("bane_fiends_grip", "resource\\flash3\\images\\spellicons\\bane_fiends_grip.png");
            Config._Renderer.TextureManager.LoadFromDota("crystal_maiden_freezing_field", "resource\\flash3\\images\\spellicons\\crystal_maiden_freezing_field.png");
            Config._Renderer.TextureManager.LoadFromDota("witch_doctor_death_ward", "resource\\flash3\\images\\spellicons\\witch_doctor_death_ward.png");

            For = new ImageToggler(true, "bane_fiends_grip", "crystal_maiden_freezing_field", "witch_doctor_death_ward");

            Forkey    = new HotkeySelector(Key.L, ForkeyPressed, HotkeyFlags.Down | HotkeyFlags.Up);
            Togglekey = new HotkeySelector(Key.K, TogglekeyPressed, HotkeyFlags.Up);
        }
示例#6
0
        public Menu()
        {
            Drawings = new Drawings();
            Hotkey   = new HotkeySelector(Key.D, HotkeyPressed, HotkeyFlags.Down | HotkeyFlags.Up);

            LinkenSave   = new LinkenSave();
            GlimmerSave  = new GlimmerSave();
            LotusCombo   = new LotusCombo();
            MainCombo    = new MainCombo();
            GlimmerCUlts = new GlimmerCUlts();
            Steal        = new Steal();
        }
示例#7
0
        public LotusCombo()
        {
            List <String> _Names = new List <String>();

            foreach (var H in EntityManager <Hero> .Entities.Where(x => x.Team != Config._Hero.Team))
            {
                var _S1 = H.Spellbook.SpellQ;
                var _S2 = H.Spellbook.SpellW;
                var _S3 = H.Spellbook.SpellE;
                var _S4 = H.Spellbook.SpellR;

                if (AbilityStorage._TargetSkills.Any(x => x.Id == _S1.Id))
                {
                    _Names.Add(_S1.Name);
                    var _SpellData = AbilityStorage._TargetSkills.First(x => x.Id == _S1.Id);
                    var _Temp      = new LotusSpellConfig()
                    {
                        AnotherTarger = _SpellData.AnotherTarget,
                        ForceUse      = _SpellData.ForceUse
                    };
                    LotusSpellConfigs.Add(_S1.Name, _Temp);
                    Config._Renderer.TextureManager.LoadFromDota(_S1.Name, $"resource\\flash3\\images\\spellicons\\{_S1.TextureName}.png");
                }
                if (AbilityStorage._TargetSkills.Any(x => x.Id == _S2.Id))
                {
                    _Names.Add(_S2.Name);
                    var _SpellData = AbilityStorage._TargetSkills.First(x => x.Id == _S2.Id);
                    var _Temp      = new LotusSpellConfig()
                    {
                        AnotherTarger = _SpellData.AnotherTarget,
                        ForceUse      = _SpellData.ForceUse
                    };
                    LotusSpellConfigs.Add(_S2.Name, _Temp);
                    Config._Renderer.TextureManager.LoadFromDota(_S2.Name, $"resource\\flash3\\images\\spellicons\\{_S2.TextureName}.png");
                }
                if (AbilityStorage._TargetSkills.Any(x => x.Id == _S3.Id))
                {
                    _Names.Add(_S3.Name);
                    var _SpellData = AbilityStorage._TargetSkills.First(x => x.Id == _S3.Id);
                    var _Temp      = new LotusSpellConfig()
                    {
                        AnotherTarger = _SpellData.AnotherTarget,
                        ForceUse      = _SpellData.ForceUse
                    };
                    LotusSpellConfigs.Add(_S3.Name, _Temp);
                    Config._Renderer.TextureManager.LoadFromDota(_S3.Name, $"resource\\flash3\\images\\spellicons\\{_S3.TextureName}.png");
                }
                if (AbilityStorage._TargetSkills.Any(x => x.Id == _S4.Id))
                {
                    _Names.Add(_S4.Name);
                    var _SpellData = AbilityStorage._TargetSkills.First(x => x.Id == _S4.Id);
                    var _Temp      = new LotusSpellConfig()
                    {
                        AnotherTarger = _SpellData.AnotherTarget,
                        ForceUse      = _SpellData.ForceUse
                    };
                    LotusSpellConfigs.Add(_S4.Name, _Temp);
                    Config._Renderer.TextureManager.LoadFromDota(_S4.Name, $"resource\\flash3\\images\\spellicons\\{_S4.TextureName}.png");
                }
            }

            SaveFromKeys = _Names.ToArray();
            SaveFrom     = new ImageToggler(true, SaveFromKeys);

            Savekey = new HotkeySelector(Key.L, SavekeyPressed, HotkeyFlags.Down | HotkeyFlags.Up);
        }