public Core() { // AssemblyLogs.GLboal.. this.me = ObjectManager.LocalHero; InvokerMenu.BuildMenu(); InvokerMenu.EventAggregator.Subscribe(this); InvokerMenu.ActiveComboChanged += this.InvokerMenu_ActiveComboChanged; InvokerMenu.GhostWalkKeyPressed += this.InvokerMenu_GhostWalkKeyPressed; this.sunstrike = new Sunstrike(this.me); this.ghostWalk = new GhostWalk(this.me); this.invokedBase = this.me.Spellbook.Spells.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Ability_Invoker_InvokedBase); // add combos this.availableCombos.Add("EulsSSMeteorBlast", new EulsSSMeteorBlast(this.me, InvokerMenu.ComboKey)); this.availableCombos.Add("AlaForSnap", new AlaForSnap(this.me, InvokerMenu.ComboKey)); this.availableCombos.Add("Assassination", new AssassinationCombo(this.me, InvokerMenu.ComboKey)); this.availableCombos.Add( "ToEMPMetBlastRefMetBlastEMP", new ToEMPMetBlastRefMetBlastEMP(this.me, InvokerMenu.ComboKey)); this.activeCombo = this.availableCombos[InvokerMenu.CurrentlyActiveCombo]; this.activeCombo.Activate(); this.CheckCombos(); Entity.OnInt32PropertyChange += this.Entity_OnInt32PropertyChange; Entity.OnHandlePropertyChange += this.Entity_OnHandlePropertyChange; GameDispatcher.OnIngameUpdate += this.GameDispatcher_OnIngameUpdate; }
private void InvokerMenu_ActiveComboChanged(object sender, StringEventArgs e) { this.activeCombo.Deactivate(); this.activeCombo = this.availableCombos[e.Value]; this.activeCombo.Activate(); }