Exemple #1
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.UnitAdded       += this.OnUnitAdded;
         EntityManager9.UnitRemoved     += this.OnUnitRemoved;
         EntityManager9.AbilityAdded    += this.OnAbilityAdded;
         EntityManager9.AbilityRemoved  += this.OnAbilityRemoved;
         Player.OnExecuteOrder          += this.OnExecuteOrder;
         this.statusEnabled.ValueChange += this.StatusEnabledOnValueChange;
         this.holdKey.ValueChange       += this.HoldKeyOnValueChange;
         this.toggleKey.ValueChange     += this.ToggleKeyOnValueChange;
         this.aegisKey.ValueChange      += this.AegisKeyOnValueChange;
     }
     else
     {
         EntityManager9.UnitAdded       -= this.OnUnitAdded;
         EntityManager9.UnitRemoved     -= this.OnUnitRemoved;
         EntityManager9.AbilityAdded    -= this.OnAbilityAdded;
         EntityManager9.AbilityRemoved  -= this.OnAbilityRemoved;
         Player.OnExecuteOrder          -= this.OnExecuteOrder;
         this.statusEnabled.ValueChange -= this.StatusEnabledOnValueChange;
         this.holdKey.ValueChange       -= this.HoldKeyOnValueChange;
         Game.OnUpdate -= this.HoldOnUpdate;
         this.toggleKey.ValueChange -= this.ToggleKeyOnValueChange;
         UpdateManager.Unsubscribe(this.ToggleOnUpdate);
         this.aegisKey.ValueChange  -= this.AegisKeyOnValueChange;
         Game.OnFireEvent           -= this.OnFireEvent;
         Game.OnUpdate              -= this.AegisOnUpdate;
         this.context.Renderer.Draw -= this.OnDraw;
     }
 }
Exemple #2
0
 // Token: 0x060000EB RID: 235 RVA: 0x0000988C File Offset: 0x00007A8C
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         if (e.OldValue)
         {
             if (AppDomain.CurrentDomain.GetAssemblies().Any((Assembly x) => !x.GlobalAssemblyCache && x.GetName().Name.Contains("Zoomhack")))
             {
                 O9K.Core.Helpers.Hud.DisplayWarning("O9K.Hud // ZoomHack is already included in O9K.Hud", 10f);
             }
         }
         foreach (KeyValuePair <string, int> keyValuePair in this.consoleCommands)
         {
             Game.GetConsoleVar(keyValuePair.Key).SetValue(keyValuePair.Value);
         }
         this.zoomVar           = Game.GetConsoleVar("dota_camera_distance");
         this.zoom.ValueChange += this.ZoomOnValueChange;
         this.key.ValueChange  += this.KeyOnValueChange;
         return;
     }
     this.key.ValueChange         -= this.KeyOnValueChange;
     this.zoom.ValueChange        -= this.ZoomOnValueChange;
     this.inputManager.MouseWheel -= this.OnMouseWheel;
     this.zoomVar.SetValue(1134);
 }
Exemple #3
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         Player.OnExecuteOrder       += this.OnExecuteOrder;
         Unit.OnModifierAdded        += this.OnModifierAdded;
         Unit.OnModifierRemoved      += this.OnModifierRemoved;
         EntityManager9.AbilityAdded += this.OnAbilityAdded;
         EntityManager9.AbilityMonitor.AbilityCasted     += this.OnAbilityCasted;
         EntityManager9.AbilityMonitor.AbilityCastChange += this.OnAbilityCastChange;
         UpdateManager.Subscribe(this.OnUpdate, 500);
     }
     else
     {
         Player.OnExecuteOrder       -= this.OnExecuteOrder;
         Unit.OnModifierAdded        -= this.OnModifierAdded;
         Unit.OnModifierRemoved      -= this.OnModifierRemoved;
         EntityManager9.AbilityAdded -= this.OnAbilityAdded;
         EntityManager9.AbilityMonitor.AbilityCasted     -= this.OnAbilityCasted;
         EntityManager9.AbilityMonitor.AbilityCastChange -= this.OnAbilityCastChange;
         UpdateManager.Unsubscribe(this.OnUpdate);
         this.context.Renderer.Draw -= this.OnDraw;
         this.morphedAbilities.Clear();
     }
 }
Exemple #4
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         OrderManager.OrderAdding                        += this.OnOrderAdding;
         ModifierManager.ModifierAdded                   += this.OnModifierAdded;
         ModifierManager.ModifierRemoved                 += this.OnModifierRemoved;
         EntityManager9.AbilityAdded                     += this.OnAbilityAdded;
         EntityManager9.AbilityMonitor.AbilityCasted     += this.OnAbilityCasted;
         EntityManager9.AbilityMonitor.AbilityCastChange += this.OnAbilityCastChange;
         UpdateManager.CreateIngameUpdate(500, this.OnUpdate);
     }
     else
     {
         OrderManager.OrderAdding                        -= this.OnOrderAdding;
         ModifierManager.ModifierAdded                   += this.OnModifierAdded;
         ModifierManager.ModifierRemoved                 -= this.OnModifierRemoved;
         EntityManager9.AbilityAdded                     -= this.OnAbilityAdded;
         EntityManager9.AbilityMonitor.AbilityCasted     -= this.OnAbilityCasted;
         EntityManager9.AbilityMonitor.AbilityCastChange -= this.OnAbilityCastChange;
         UpdateManager.DestroyIngameUpdate(this.OnUpdate);
         RendererManager.Draw -= this.OnDraw;
         this.morphedAbilities.Clear();
     }
 }
Exemple #5
0
        private void InformationOnPropertyChanged(MenuSwitcher switcher, SwitcherEventArgs e)
        {
            if (e.Value == information)
            {
                return;
            }

            UpdateManager.BeginInvoke(() =>
            {
                var unit = (this.player.QueryUnit ?? this.player.SelectedUnits.FirstOrDefault()) as Unit;
                if (unit?.IsValid != true)
                {
                    return;
                }

                this.lastUnitInfo = unit.Handle;

                var item = new LogItem(LogType.Modifier, Color.PaleGreen, "Modifiers information");

                item.AddLine("Unit name: " + unit.Name, unit.Name);
                item.AddLine("Unit network name: " + unit.NetworkName, unit.NetworkName);
                item.AddLine("Unit classID: " + unit.ClassId, unit.ClassId);

                foreach (var modifier in unit.Modifiers)
                {
                    if (!this.showHidden && modifier.IsHidden)
                    {
                        continue;
                    }

                    var modifierItem = new LogItem(LogType.Modifier, Color.PaleGreen);

                    modifierItem.AddLine("Name: " + modifier.Name, modifier.Name);

                    if (this.showTextureName)
                    {
                        modifierItem.AddLine("Texture name: " + modifier.TextureName, modifier.TextureName);
                    }

                    if (this.showHidden)
                    {
                        modifierItem.AddLine("Is hidden: " + modifier.IsHidden, modifier.IsHidden);
                    }

                    if (this.showElapsedTime)
                    {
                        modifierItem.AddLine("Elapsed time: " + modifier.ElapsedTime, modifier.ElapsedTime);
                    }

                    if (this.showRemainingTime)
                    {
                        modifierItem.AddLine("Remaining time: " + modifier.RemainingTime, modifier.RemainingTime);
                    }

                    this.log.Display(modifierItem);
                }

                this.log.Display(item);
            });
        }
 // Token: 0x0600002C RID: 44 RVA: 0x00005460 File Offset: 0x00003660
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         if (e.OldValue)
         {
             if (AppDomain.CurrentDomain.GetAssemblies().Any((Assembly x) => !x.GlobalAssemblyCache && x.GetName().Name.Contains("VisibleByEnemy")))
             {
                 O9K.Core.Helpers.Hud.DisplayWarning("O9K.Hud // VisibleByEnemy is already included in O9K.Hud", 10f);
             }
         }
         this.effectName.ValueChange += this.EffectNameOnValueChange;
         EntityManager9.UnitAdded    += this.OnUnitAdded;
         EntityManager9.UnitRemoved  += this.OnUnitRemoved;
         UpdateManager.Subscribe(new Action(this.OnUpdate), 300, true);
         this.heroes.ValueChange    += this.OptionOnValueChange;
         this.creeps.ValueChange    += this.OptionOnValueChange;
         this.buildings.ValueChange += this.OptionOnValueChange;
         this.other.ValueChange     += this.OptionOnValueChange;
         return;
     }
     EntityManager9.UnitAdded   -= this.OnUnitAdded;
     EntityManager9.UnitRemoved -= this.OnUnitRemoved;
     UpdateManager.Unsubscribe(new Action(this.OnUpdate));
     this.heroes.ValueChange    -= this.OptionOnValueChange;
     this.creeps.ValueChange    -= this.OptionOnValueChange;
     this.buildings.ValueChange -= this.OptionOnValueChange;
     this.other.ValueChange     -= this.OptionOnValueChange;
     foreach (ParticleEffect particleEffect in this.particles.Values)
     {
         particleEffect.Dispose();
     }
     this.particles.Clear();
     this.units.Clear();
 }
Exemple #7
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.UnitAdded        += this.OnUnitAdded;
         EntityManager9.UnitRemoved      += this.OnUnitRemoved;
         ModifierManager.ModifierAdded   += this.OnModifierAdded;
         ModifierManager.ModifierRemoved += this.OnModifierRemoved;
         UpdateManager.CreateIngameUpdate(500, this.OnUpdate);
         RendererManager.Draw               += this.OnDraw;
         this.ignoreAuras.ValueChange       += this.IgnoreOnValueChange;
         this.ignoreUnknownTime.ValueChange += this.IgnoreOnValueChange;
         this.ignoreHiddenAuras.ValueChange += this.IgnoreOnValueChange;
     }
     else
     {
         EntityManager9.UnitAdded        -= this.OnUnitAdded;
         EntityManager9.UnitRemoved      -= this.OnUnitRemoved;
         ModifierManager.ModifierAdded   -= this.OnModifierAdded;
         ModifierManager.ModifierRemoved -= this.OnModifierRemoved;
         UpdateManager.DestroyIngameUpdate(this.OnUpdate);
         RendererManager.Draw               -= this.OnDraw;
         this.ignoreAuras.ValueChange       -= this.IgnoreOnValueChange;
         this.ignoreUnknownTime.ValueChange -= this.IgnoreOnValueChange;
         this.ignoreHiddenAuras.ValueChange -= this.IgnoreOnValueChange;
         this.units.Clear();
     }
 }
Exemple #8
0
        private void ShowOnValueChange(object sender, SwitcherEventArgs e)
        {
            if (e.NewValue)
            {
                foreach (var tower in EntityManager9.Units.Where(x => x.IsTower && x.IsAlive))
                {
                    this.UnitMonitorOnUnitHealthChange(tower, tower.Health);
                }

                EntityManager9.UnitMonitor.UnitHealthChange += this.UnitMonitorOnUnitHealthChange;
                EntityManager9.UnitMonitor.UnitDied         += this.UnitMonitorOnUnitDied;
            }
            else
            {
                EntityManager9.UnitMonitor.UnitHealthChange -= this.UnitMonitorOnUnitHealthChange;
                EntityManager9.UnitMonitor.UnitDied         -= this.UnitMonitorOnUnitDied;

                foreach (var effect in this.towers.Values)
                {
                    effect.Dispose();
                }

                this.towers.Clear();
            }
        }
Exemple #9
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     try
     {
         if (e.NewValue)
         {
             this.TargetManager.Enable();
             this.KillSteal.Enable();
             this.FailSafe.Enable();
             this.ShieldBreaker.Enable();
             this.UnitManager.Enable();
             this.combo.Enable();
             this.moveCombo.Enable();
             this.EnableCustomModes();
         }
         else
         {
             this.DisableCustomModes();
             this.TargetManager.Disable();
             this.KillSteal.Disable();
             this.FailSafe.Disable();
             this.ShieldBreaker.Disable();
             this.UnitManager.Disable();
             this.combo.Disable();
             this.moveCombo.Disable();
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
Exemple #10
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.UnitAdded   += this.OnUnitAdded;
         EntityManager9.UnitRemoved += this.OnUnitRemoved;
         Unit.OnModifierAdded       += this.OnModifierAdded;
         Unit.OnModifierRemoved     += this.OnModifierRemoved;
         UpdateManager.Subscribe(this.OnUpdate, 500);
         this.context.Renderer.Draw         += this.OnDraw;
         this.ignoreAuras.ValueChange       += this.IgnoreOnValueChange;
         this.ignoreUnknownTime.ValueChange += this.IgnoreOnValueChange;
         this.ignoreHiddenAuras.ValueChange += this.IgnoreOnValueChange;
     }
     else
     {
         EntityManager9.UnitAdded   -= this.OnUnitAdded;
         EntityManager9.UnitRemoved -= this.OnUnitRemoved;
         Unit.OnModifierAdded       -= this.OnModifierAdded;
         Unit.OnModifierRemoved     -= this.OnModifierRemoved;
         UpdateManager.Unsubscribe(this.OnUpdate);
         this.context.Renderer.Draw         -= this.OnDraw;
         this.ignoreAuras.ValueChange       -= this.IgnoreOnValueChange;
         this.ignoreUnknownTime.ValueChange -= this.IgnoreOnValueChange;
         this.ignoreHiddenAuras.ValueChange -= this.IgnoreOnValueChange;
         this.units.Clear();
     }
 }
Exemple #11
0
 // Token: 0x0600020A RID: 522 RVA: 0x0000FD50 File Offset: 0x0000DF50
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         if (e.OldValue)
         {
             if (AppDomain.CurrentDomain.GetAssemblies().Any((Assembly x) => !x.GlobalAssemblyCache && x.GetName().Name.Contains("PredictedCreepsLocation")))
             {
                 O9K.Core.Helpers.Hud.DisplayWarning("O9K.Hud // PredictedCreepsLocation is already included in O9K.Hud", 10f);
             }
         }
         EntityManager9.UnitAdded            += this.OnUnitAdded;
         EntityManager9.UnitRemoved          += this.OnUnitRemoved;
         EntityManager9.UnitMonitor.UnitDied += this.OnUnitRemoved;
         Entity.OnBoolPropertyChange         += this.OnBoolPropertyChange;
         UpdateManager.Subscribe(new Action(this.OnUpdate), 0, true);
         this.context.Renderer.Draw += this.OnDraw;
         return;
     }
     this.context.Renderer.Draw          -= this.OnDraw;
     EntityManager9.UnitAdded            -= this.OnUnitAdded;
     EntityManager9.UnitRemoved          -= this.OnUnitRemoved;
     EntityManager9.UnitMonitor.UnitDied -= this.OnUnitRemoved;
     Entity.OnBoolPropertyChange         -= this.OnBoolPropertyChange;
     UpdateManager.Unsubscribe(new Action(this.OnUpdate));
     this.creepWaves.Clear();
 }
Exemple #12
0
 private void BlockNotSelectUnits_OnValueChange(object sender, SwitcherEventArgs e)
 {
     if (!e.NewValue)
     {
         this.SelectUnits.IsEnabled = false;
     }
 }
Exemple #13
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("PredictedCreepsLocation")))
                    {
                        Hud.DisplayWarning("O9K.Hud // PredictedCreepsLocation is already included in O9K.Hud");
                    }
                }

                EntityManager9.UnitAdded            += this.OnUnitAdded;
                EntityManager9.UnitRemoved          += this.OnUnitRemoved;
                EntityManager9.UnitMonitor.UnitDied += this.OnUnitRemoved;
                //Entity.OnBoolPropertyChange += this.OnBoolPropertyChange;
                UpdateManager.CreateIngameUpdate(300, this.OnUpdateTime);
                UpdateManager.CreateIngameUpdate(this.OnUpdate);
                RendererManager.Draw += this.OnDraw;
            }
            else
            {
                RendererManager.Draw                -= this.OnDraw;
                EntityManager9.UnitAdded            -= this.OnUnitAdded;
                EntityManager9.UnitRemoved          -= this.OnUnitRemoved;
                EntityManager9.UnitMonitor.UnitDied -= this.OnUnitRemoved;
                //Entity.OnBoolPropertyChange -= this.OnBoolPropertyChange;
                UpdateManager.DestroyIngameUpdate(this.OnUpdateTime);
                UpdateManager.DestroyIngameUpdate(this.OnUpdate);
                this.creepWaves.Clear();
            }
        }
Exemple #14
0
 private void OfScreenBlock_OnValueChange(object sender, SwitcherEventArgs e)
 {
     if (!e.NewValue)
     {
         this.MoveCamera.IsEnabled = false;
     }
 }
Exemple #15
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 #16
0
        private void isEnableChanged(MenuSwitcher switcher, SwitcherEventArgs e)
        {
            if (e.Value)
            {
                stone_time     = 0;
                PlaceStoneTime = 0;
                enchant_time   = 0;
                kick_time      = 0;
                roll_time      = 0;

                myHero = EntityManager.LocalHero;

                UpdateManager.IngameUpdate += OnUpdate;
                InputManager.KeyUp         += OnInputManagerKeyUpCtrl;
                InputManager.KeyDown       += OnInputManagerKeyDownCtrl;
                InputManager.KeyUp         += OnInputManagerKeyUpAlt;
                InputManager.KeyDown       += OnInputManagerKeyDownAlt;
                OrderManager.OrderAdding   += OnUnitOrder;
            }
            else
            {
                UpdateManager.IngameUpdate -= OnUpdate;
                InputManager.KeyUp         -= OnInputManagerKeyUpCtrl;
                InputManager.KeyDown       -= OnInputManagerKeyDownCtrl;
                InputManager.KeyUp         -= OnInputManagerKeyUpAlt;
                InputManager.KeyDown       -= OnInputManagerKeyDownAlt;
                OrderManager.OrderAdding   -= OnUnitOrder;
            }
        }
Exemple #17
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.UnitAdded       += this.OnUnitAdded;
         EntityManager9.UnitRemoved     += this.OnUnitRemoved;
         EntityManager9.AbilityAdded    += this.OnAbilityAdded;
         EntityManager9.AbilityRemoved  += this.OnAbilityRemoved;
         OrderManager.OrderAdding       += this.OnOrderAdding;
         this.statusEnabled.ValueChange += this.StatusEnabledOnValueChange;
         this.holdKey.ValueChange       += this.HoldKeyOnValueChange;
         this.toggleKey.ValueChange     += this.ToggleKeyOnValueChange;
         this.aegisKey.ValueChange      += this.AegisKeyOnValueChange;
     }
     else
     {
         EntityManager9.UnitAdded       -= this.OnUnitAdded;
         EntityManager9.UnitRemoved     -= this.OnUnitRemoved;
         EntityManager9.AbilityAdded    -= this.OnAbilityAdded;
         EntityManager9.AbilityRemoved  -= this.OnAbilityRemoved;
         OrderManager.OrderAdding       -= this.OnOrderAdding;
         this.statusEnabled.ValueChange -= this.StatusEnabledOnValueChange;
         this.holdKey.ValueChange       -= this.HoldKeyOnValueChange;
         UpdateManager.Update           -= this.HoldOnUpdate;
         this.toggleKey.ValueChange     -= this.ToggleKeyOnValueChange;
         UpdateManager.DestroyIngameUpdate(this.ToggleOnUpdate);
         this.aegisKey.ValueChange -= this.AegisKeyOnValueChange;
         GameManager.GameEvent     -= this.OnGameEvent;
         UpdateManager.Update      -= this.AegisOnUpdate;
         RendererManager.Draw      -= this.OnDraw;
     }
 }
 // Token: 0x0600022F RID: 559 RVA: 0x00011714 File Offset: 0x0000F914
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         if (e.OldValue)
         {
             if (AppDomain.CurrentDomain.GetAssemblies().Any((Assembly x) => !x.GlobalAssemblyCache && x.GetName().Name.Contains("VisionControl")))
             {
                 O9K.Core.Helpers.Hud.DisplayWarning("O9K.Hud // VisionControl is already included in O9K.Hud", 10f);
             }
             if (AppDomain.CurrentDomain.GetAssemblies().Any((Assembly x) => !x.GlobalAssemblyCache && x.GetName().Name.Contains("VisionControl")))
             {
                 O9K.Core.Helpers.Hud.DisplayWarning("O9K.Hud // BeAware is already included in O9K.Hud", 10f);
             }
         }
         EntityManager9.UnitAdded   += this.OnUnitAdded;
         EntityManager9.UnitRemoved += this.OnUnitRemoved;
         UpdateManager.Subscribe(new Action(this.OnUpdateRemove), 500, true);
         UpdateManager.Subscribe(new Action(this.OnUpdateWard), 200, true);
         Entity.OnParticleEffectAdded += this.OnParticleEffectAdded;
         ObjectManager.OnAddEntity    += this.OnAddEntity;
         ObjectManager.OnRemoveEntity += this.OnRemoveEntity;
         this.context.Renderer.Draw   += this.OnDraw;
         return;
     }
     this.context.Renderer.Draw   -= this.OnDraw;
     EntityManager9.UnitAdded     -= this.OnUnitAdded;
     EntityManager9.UnitRemoved   -= this.OnUnitRemoved;
     Entity.OnParticleEffectAdded -= this.OnParticleEffectAdded;
     ObjectManager.OnAddEntity    -= this.OnAddEntity;
     ObjectManager.OnRemoveEntity -= this.OnRemoveEntity;
     UpdateManager.Unsubscribe(new Action(this.OnUpdateRemove));
     UpdateManager.Unsubscribe(new Action(this.OnUpdateWard));
 }
 // Token: 0x06000074 RID: 116 RVA: 0x0000246E File Offset: 0x0000066E
 private void DrawTargetParticleOnValueChanged(object sender, SwitcherEventArgs e)
 {
     this.drawTargetParticle = e.NewValue;
     if (!this.drawTargetParticle)
     {
         this.RemoveTargetParticle();
     }
 }
 // Token: 0x0600019D RID: 413 RVA: 0x00003038 File Offset: 0x00001238
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.UnitMonitor.UnitHealthChange += this.OnUnitHealthChange;
         return;
     }
     EntityManager9.UnitMonitor.UnitHealthChange -= this.OnUnitHealthChange;
 }
 // Token: 0x060001AD RID: 429 RVA: 0x00003130 File Offset: 0x00001330
 private void PowerEnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         UpdateManager.Subscribe(new Action(this.PowerOnUpdate), 1000, true);
         return;
     }
     UpdateManager.Unsubscribe(new Action(this.PowerOnUpdate));
 }
Exemple #22
0
 // Token: 0x060000F5 RID: 245 RVA: 0x00009AC8 File Offset: 0x00007CC8
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         this.context.Renderer.Draw += this.OnDraw;
         return;
     }
     this.context.Renderer.Draw -= this.OnDraw;
 }
 // Token: 0x060002FC RID: 764 RVA: 0x00003DF3 File Offset: 0x00001FF3
 private void EnabledOnValueChanged(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         this.renderer.Draw += new RendererManager9.EventHandler(this.OnDraw);
         return;
     }
     this.renderer.Draw -= new RendererManager9.EventHandler(this.OnDraw);
 }
 // Token: 0x060001A2 RID: 418 RVA: 0x00003099 File Offset: 0x00001299
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.AbilityAdded += this.OnAbilityAdded;
         return;
     }
     EntityManager9.AbilityAdded -= this.OnAbilityAdded;
 }
Exemple #25
0
        private void LearnOnValueChange(object sender, SwitcherEventArgs e)
        {
            if (e.NewValue == e.OldValue || !e.NewValue)
            {
                return;
            }

            UpdateManager.BeginInvoke(() => this.LearnAbility((int)this.owner.Hero.BaseHero.AbilityPoints), 100);
        }
Exemple #26
0
        private void MoveCamera_OnValueChange(object sender, SwitcherEventArgs e)
        {
            if (e.NewValue && !this.OfScreenBlock)
            {
                e.Process = false;
                return;
            }

            this.eventManager.InvokeOrderBlockerMoveCamera(e.NewValue);
        }
Exemple #27
0
 private void AutoComboChanged(MenuSwitcher switcher, SwitcherEventArgs e)
 {
     if (e.Value)
     {
         ComboPanelMore += 30;
     }
     else
     {
         ComboPanelMore -= 30;
     }
 }
Exemple #28
0
 private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         UpdateManager.Subscribe(this.OnUpdate, 1000);
     }
     else
     {
         UpdateManager.Unsubscribe(this.OnUpdate);
     }
 }
Exemple #29
0
        private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
        {
            if (e.NewValue)
            {
                UpdateManager.BeginInvoke(() => this.abilityBuilder.GetBuild(), 3000);
            }

            Entity.OnInt32PropertyChange    -= this.OnInt32PropertyChange;
            this.learnTalents.ValueChange   -= this.LearnOnValueChange;
            this.learnAbilities.ValueChange -= this.LearnOnValueChange;
        }
Exemple #30
0
 private void PhilosophersStoneOnValueChange(object sender, SwitcherEventArgs e)
 {
     if (e.NewValue)
     {
         EntityManager9.UnitMonitor.UnitDied += this.UnitMonitorOnUnitDied;
     }
     else
     {
         EntityManager9.UnitMonitor.UnitDied -= this.UnitMonitorOnUnitDied;
     }
 }