Example #1
0
        public bool CanBeCasted(
            UsableAbility ability,
            bool canHit           = true,
            bool shouldCast       = true,
            bool channelingCheck  = true,
            bool canBeCastedCheck = true)
        {
            if (ability?.Ability.IsValid != true)
            {
                return(false);
            }

            if (this.menu?.IsAbilityEnabled(ability.Ability) == false)
            {
                return(false);
            }

            if (canBeCastedCheck && !ability.CanBeCasted(this.TargetManager, channelingCheck, this.menu))
            {
                return(false);
            }

            if (canHit && !ability.CanHit(this.TargetManager, this.menu))
            {
                return(false);
            }

            if (shouldCast && !ability.ShouldCast(this.TargetManager))
            {
                return(false);
            }

            return(true);
        }
        // Token: 0x06000A03 RID: 2563 RVA: 0x0002BB30 File Offset: 0x00029D30
        public bool CanBeCasted(UsableAbility ability, bool canHit = true, bool shouldCast = true, bool channelingCheck = true, bool canBeCastedCheck = true)
        {
            if (ability == null || !ability.Ability.IsValid)
            {
                return(false);
            }
            IComboModeMenu comboModeMenu = this.menu;

            return((comboModeMenu == null || comboModeMenu.IsAbilityEnabled(ability.Ability)) && (!canBeCastedCheck || ability.CanBeCasted(this.TargetManager, channelingCheck, this.menu)) && (!canHit || ability.CanHit(this.TargetManager, this.menu)) && (!shouldCast || ability.ShouldCast(this.TargetManager)));
        }