Exemple #1
0
 public void Activate()
 {
     foreach (var cmd in this.consoleCommands)
     {
         ConVarManager.SetValue(cmd.Key, cmd.Value);
     }
 }
Exemple #2
0
        private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
        {
            if (e.NewValue)
            {
                if (e.OldValue)
                {
                    //todo delete
                    if (AppDomain.CurrentDomain.GetAssemblies().Any(x => !x.GlobalAssemblyCache && x.GetName().Name.Contains("Zoomhack")))
                    {
                        Hud.DisplayWarning("O9K.Hud // ZoomHack is already included in O9K.Hud");
                    }
                }

                foreach (var cmd in this.consoleCommands)
                {
                    ConVarManager.SetValue(cmd.Key, cmd.Value);
                }

                this.zoom.ValueChange += this.ZoomOnValueChange;
                this.key.ValueChange  += this.KeyOnValueChange;
            }
            else
            {
                this.key.ValueChange    -= this.KeyOnValueChange;
                this.zoom.ValueChange   -= this.ZoomOnValueChange;
                InputManager.MouseWheel -= this.OnMouseWheel;

                ConVarManager.SetValue("dota_camera_distance", GameData.DefaultZoom);
            }
        }
Exemple #3
0
        public ZoomHack(RootMenu rootMenu)
        {
            var zoomHackMenu = rootMenu.CreateMenu("Zoom Hack");

            ZoomKeyItem    = zoomHackMenu.CreateHoldKey("Key", Key.LeftCtrl);
            ZoomSliderItem = zoomHackMenu.CreateSlider("Camera Distance", DefaultZoomValue, MinZoomValue, MaxZoomValue);

            ConVarManager.SetValue("r_farz", 18000);

            ZoomSliderItem.ValueChanged += OnZoomSliderValueChanged;
            InputManager.MouseWheel     += OnInputManagerMouseWheel;

            GameManager.ExecuteCommand("dota_camera_disable_zoom true");
        }
Exemple #4
0
 private void ZoomOnValueChange(object sender, SliderEventArgs e)
 {
     ConVarManager.SetValue("dota_camera_distance", e.NewValue);
 }
Exemple #5
0
        /*public void Dispose()
         * {
         *  Game.ExecuteCommand("dota_camera_disable_zoom false");
         *
         *  ZoomVar.SetValue(DefaultZoomValue);
         *
         *  ZoomSliderItem.PropertyChanged -= ZoomSliderItemChanged;
         *  InputManage.Value.MouseWheel -= InputManagerMouseWheel;
         * }*/

        private void OnZoomSliderValueChanged(MenuSlider slider, SliderEventArgs e)
        {
            ConVarManager.SetValue("dota_camera_distance", e.NewValue);
        }
Exemple #6
0
        /*public void Dispose()
         * {
         *  Weather.SetValue(0);
         *
         *  WeatherItem.PropertyChanged -= WeatherItemChanged;
         * }*/

        private void OnWeatherValueChanged(MenuSelector selector, SelectorEventArgs e)
        {
            ConVarManager.SetValue("cl_weather", Array.IndexOf(WeatherNames, e.NewValue));
        }
Exemple #7
0
 private void ParticleHackItemChanged(MenuSwitcher switcher, SwitcherEventArgs e)
 {
     ConVarManager.SetValue("dota_use_particle_fow", !e.Value);
 }
Exemple #8
0
 private void FilteringItemChanged(MenuSwitcher switcher, SwitcherEventArgs e)
 {
     ConVarManager.SetValue("fow_client_nofiltering", e.Value);
 }
Exemple #9
0
        /*public void Dispose()
         * {
         *  Fog.SetValue(1);
         *  Filtering.SetValue(0);
         *  ParticleHack.SetValue(1);
         *
         *  FogItem.PropertyChanged -= FogItemChanged;
         *  FilteringItem.PropertyChanged -= FilteringItemChanged;
         *  ParticleHackItem.PropertyChanged -= ParticleHackItemChanged;
         * }*/

        private void FogItemChanged(MenuSwitcher switcher, SwitcherEventArgs e)
        {
            ConVarManager.SetValue("fog_enable", !e.Value);
        }