public void Activate() { foreach (var cmd in this.consoleCommands) { ConVarManager.SetValue(cmd.Key, cmd.Value); } }
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); } }
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"); }
private void ZoomOnValueChange(object sender, SliderEventArgs e) { ConVarManager.SetValue("dota_camera_distance", e.NewValue); }
/*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); }
/*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)); }
private void ParticleHackItemChanged(MenuSwitcher switcher, SwitcherEventArgs e) { ConVarManager.SetValue("dota_use_particle_fow", !e.Value); }
private void FilteringItemChanged(MenuSwitcher switcher, SwitcherEventArgs e) { ConVarManager.SetValue("fow_client_nofiltering", e.Value); }
/*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); }