fBaseXtensions.Game.Hero.Skills.Skill.PreActivation C# (CSharp) Method

PreActivation() private method

private PreActivation ( ) : bool
return bool
        internal virtual bool PreActivation()
        {
            // Force waiting for global cooldown timer or long-animation abilities
            if (WaitLoopsBefore >= 1 || (WaitWhileAnimating && DateTime.Now.Subtract(PowerCacheLookup.lastGlobalCooldownUse).TotalMilliseconds <= 50))
            {
                //Logger.DBLog.DebugFormat("Debug: Force waiting BEFORE Ability " + powerPrime.powerThis.ToString() + "...");
                FunkyGame.Targeting.Cache.bWaitingForPower = true;
                if (WaitLoopsBefore >= 1)
                    WaitLoopsBefore--;
                return false;
            }
            FunkyGame.Targeting.Cache.bWaitingForPower = false;

            // Wait while animating before an attack
            if (WaitWhileAnimating)
                FunkyGame.Hero.WaitWhileAnimating(5);

            preActivationFinished = true;
            return true;
        }