Exemplo n.º 1
0
        private async Task <bool> CastHoj(WoWUnit unit)
        {
            if (!await HammerOfJustice.Cast(unit))
            {
                return(false);
            }

            Helpers.Logger.PrintLog("Stunning {0}", unit.SafeName);

            LastSpell = HammerOfJustice;
            return(true);
        }
Exemplo n.º 2
0
        public async Task <bool> HotkeysMethod()
        {
            // TODO unify methods
            // TODO hotkey for steed

            if (Globals.ActivateBurst)
            {
                Helpers.Logger.PrintLog("Cooldown Hotkey: activating");
                return(await BurstMethod());
            }

            if (Globals.ActivateDivineSteed)
            {
                if (SpellManager.GlobalCooldown)
                {
                    return(true);
                }

                Globals.ActivateDivineSteed = false;
                return(await DivineSteed.Cast(StyxWoW.Me));
            }

            if (SpellBooks.Global.Hotkeys.HoJCheck(HammerOfJustice))
            {
                if (SpellManager.GlobalCooldown)
                {
                    return(true);
                }

                // Cast spell and set bool back to false
                // If it doesn't cast, return true for the tree to repeat
                if (!await HammerOfJustice.Cast(Globals.HoJTarget))
                {
                    return(true);
                }

                Helpers.Logger.PrintLog("HoJ Hotkey on {0}", Globals.HoJTarget.SafeName);
                Globals.HoJTarget = null;
                await CommonCoroutines.SleepForLagDuration();

                return(true);
            }

            return(false);
        }