Esempio n. 1
0
        public PowerTreadsSwitcher(Manager manager, MenuManager menu, AbilityId abilityId)
        {
            this.manager = manager;
            this.menu    = menu.AutoActionsMenu.PowerTreadsMenu;
            recoveryMenu = menu.RecoveryMenu;
            order        = new Order();

            AbilityId = abilityId;
            Refresh();

            foreach (var ability in manager.MyHero.Abilities.Where(x => x.GetManaCost(0) > 0))
            {
                this.menu.AddAbility(ability.StoredName(), true);
            }

            manager.OnAbilityAdd    += OnAbilityAdd;
            manager.OnAbilityRemove += OnAbilityRemove;
            updateHandler            = UpdateManager.Subscribe(OnUpdate, 100, this.menu.IsEnabled);
            if (this.menu.IsEnabled)
            {
                Unit.OnModifierAdded   += OnModifierAdded;
                Unit.OnModifierRemoved += OnModifierRemoved;
                Player.OnExecuteOrder  += OnExecuteOrder;
            }
            this.menu.OnEnabledChange += MenuOnEnabledChange;
        }
Esempio n. 2
0
        public RecoveryAbuse(Manager manager, MenuManager menu)
        {
            this.manager     = manager;
            this.menu        = menu.RecoveryMenu;
            tranquilDropMenu = menu.AbilityHelperMenu.TranquilMenu;

            UpdateManager.Subscribe(OnUpdate);
            Player.OnExecuteOrder   += OnExecuteOrder;
            this.menu.OnAbuseChange += OnAbuseChange;
        }
Esempio n. 3
0
        public bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
        {
            if (menu.ItemSettingsMenu.BottleSettings.OverhealEnabled)
            {
                return(missingMana >= menu.ItemSettingsMenu.BottleSettings.MpThreshold ||
                       missingHealth >= menu.ItemSettingsMenu.BottleSettings.HpThreshold);
            }

            return(missingMana >= menu.ItemSettingsMenu.BottleSettings.MpThreshold &&
                   missingHealth >= menu.ItemSettingsMenu.BottleSettings.HpThreshold);
        }
Esempio n. 4
0
        public RecoveryAbuse(Manager manager, MenuManager menu)
        {
            this.manager     = manager;
            this.menu        = menu.RecoveryMenu;
            tranquilDropMenu = menu.AbilityHelperMenu.TranquilMenu;

            updateHandler = UpdateManager.Subscribe(OnUpdate, 0, this.menu.IsEnabled);
            if (this.menu.IsEnabled)
            {
                Player.OnExecuteOrder   += OnExecuteOrder;
                this.menu.OnAbuseChange += OnAbuseChange;
            }
            this.menu.OnEnabledChange += MenuOnEnabledChange;
        }
Esempio n. 5
0
        public AutoBottle(Manager manager, MenuManager menu, AbilityId abilityId)
        {
            this.manager = manager;
            this.menu    = menu.AutoActionsMenu.AutoHealsMenu.AutoBottleMenu;
            recoveryMenu = menu.RecoveryMenu;

            fountain = ObjectManager.GetEntitiesParallel <Unit>()
                       .First(x => x.IsValid && x.ClassId == ClassId.CDOTA_Unit_Fountain && x.Team == manager.MyHero.Team)
                       .Position;

            AbilityId = abilityId;
            Refresh();

            UpdateManager.Subscribe(OnUpdate, 300);
            Player.OnExecuteOrder += OnExecuteOrder;
        }
Esempio n. 6
0
        public AutoBottle(Manager manager, MenuManager menu, AbilityId abilityId)
        {
            this.manager = manager;
            this.menu    = menu.AutoActionsMenu.AutoHealsMenu.AutoBottleMenu;
            recoveryMenu = menu.RecoveryMenu;

            AbilityId = abilityId;
            Refresh();

            updateHandler = UpdateManager.Subscribe(OnUpdate, 300, this.menu.IsEnabled);
            if (this.menu.IsEnabled)
            {
                Player.OnExecuteOrder += OnExecuteOrder;
            }
            this.menu.OnEnabledChange += MenuOnEnabledChange;
        }
Esempio n. 7
0
        public MenuManager()
        {
            mainMenu = new Menu(" Item Manager", "itemManager", true, "courier_go_to_secretshop", true);

            OffensiveAbilitiesMenu = new OffensiveAbilitiesMenu(mainMenu);
            DefensiveAbilitiesMenu = new DefensiveAbilitiesMenu(mainMenu);
            AutoActionsMenu        = new AutoActionsMenu(mainMenu);
            AbilityHelperMenu      = new AbilityHelperMenu(mainMenu);
            RecoveryMenu           = new RecoveryMenu(mainMenu);
            GoldSpenderMenu        = new GoldSpenderMenu(mainMenu);
            SnatcherMenu           = new SnatcherMenu(mainMenu);
            ItemSwapMenu           = new ItemSwapMenu(mainMenu);
            ShrineHelperMenu       = new ShrineHelperMenu(mainMenu);
            CourierHelperMenu      = new CourierHelperMenu(mainMenu);

            mainMenu.AddToMainMenu();
        }
Esempio n. 8
0
 public bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(true);
 }
Esempio n. 9
0
 public virtual bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(missingHealth >= menu.ItemSettingsMenu.UrnOfShadows.HpThreshold);
 }
Esempio n. 10
0
 public bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(missingHealth >= menu.ItemSettingsMenu.Mekansm.HpThreshold);
 }
Esempio n. 11
0
 public bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(missingMana >= menu.ItemSettingsMenu.GuardianGreaves.MpThreshold ||
            missingHealth >= menu.ItemSettingsMenu.GuardianGreaves.HpThreshold);
 }
Esempio n. 12
0
 public bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(missingMana >= menu.ItemSettingsMenu.SoulRing.MpThreshold &&
            hero.HealthPercentage >= menu.ItemSettingsMenu.SoulRing.HpThreshold);
 }
Esempio n. 13
0
 public bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(missingMana >= menu.ItemSettingsMenu.ArcaneBootsSettings.MpThreshold);
 }
Esempio n. 14
0
 public override bool ShouldBeUsed(MyHero hero, RecoveryMenu menu, float missingHealth, float missingMana)
 {
     return(missingHealth >= menu.ItemSettingsMenu.SpiritVessel.HpThreshold);
 }