Esempio n. 1
0
        public virtual TimeSpan GetCastRecovery()
        {
            // Staff members have no recovery
            if (Caster.AccessLevel >= AccessLevel.GameMaster)
            {
                return(TimeSpan.Zero);
            }

            if (Caster is BaseCreature && ((BaseCreature)Caster).InstantCast)
            {
                return(TimeSpan.Zero);
            }

            int fcr = Caster.GetMagicalAttribute(AosAttribute.CastRecovery);

            if (Caster is BaseCreature && !((BaseCreature)Caster).Controlled && !((BaseCreature)Caster).Summoned)
            {
                fcr = 4;
            }

            fcr -= ThunderstormSpell.GetCastRecoveryMalus(Caster);

            int fcrDelay = -(CastRecoveryFastScalar * fcr);

            int delay = CastRecoveryBase + fcrDelay;

            if (delay < CastRecoveryMinimum)
            {
                delay = CastRecoveryMinimum;
            }

            return(TimeSpan.FromSeconds((double)delay / CastRecoveryPerSecond));
        }
Esempio n. 2
0
        public virtual TimeSpan GetCastRecovery()
        {
            if (!Core.AOS)
            {
                return(NextSpellDelay);
            }

            int fcr = AosAttributes.GetValue(m_Caster, AosAttribute.CastRecovery);

            if (fcr > 8)
            {
                fcr = 8;
            }

            fcr -= ThunderstormSpell.GetCastRecoveryMalus(m_Caster);

            int fcrDelay = -(CastRecoveryFastScalar * fcr);

            int delay = CastRecoveryBase + fcrDelay;

            if (delay < CastRecoveryMinimum)
            {
                delay = CastRecoveryMinimum;
            }

            return(TimeSpan.FromSeconds((double)delay / CastRecoveryPerSecond));
        }
Esempio n. 3
0
        public override TimeSpan GetCastRecovery()
        {               //Pre-AOS delay is 0.75 seconds.
            int fcr = AosAttributes.GetValue(Caster, AosAttribute.CastRecovery);

            if (fcr > 4)
            {
                fcr = 4;
            }

            fcr -= ThunderstormSpell.GetCastRecoveryMalus(Caster);

            double delay = 0.25 * PowerLevel;

            delay -= ((double)fcr) * 0.25;

            return(TimeSpan.FromSeconds(delay));
        }