Example #1
0
        /// <summary>
        /// Computes the additive value of level scaling based on application target's level.
        /// Determined by spell effect BasePointsAdditiveLevelModifier.
        /// </summary>
        /// <param name="context">The spell application context.</param>
        /// <returns>The additive value of level scaling.</returns>
        protected int ComputeAdditiveLevelScaling([NotNull] SpellEffectApplicationContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            return((int)((float)context.ApplicationTargetEntityData.GetFieldValue <int>(BaseObjectField.UNIT_FIELD_LEVEL) * context.SpellEffectData.SpellEffect.BasePointsAdditiveLevelModifier));
        }
Example #2
0
        public override void ApplySpellEffect([NotNull] SpellEffectApplicationContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            //TODO: Support spell schools AKA Frost damage, nature, physical and etc.
            int damageValue = RollEffectValue(context.SpellEffectData.SpellEffect) + ComputeAdditiveLevelScaling(context);

            ApplyDamage(context.ApplicationTarget, damageValue, context.SpellSource);
        }
Example #3
0
        public override void ApplySpellEffect([NotNull] SpellEffectApplicationContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            //TODO: Implement healing power influence.
            //TODO: Support spell schools AKA Holy heal, nature, shadow/dark and etc.
            int healAmount = RollEffectValue(context.SpellEffectData.SpellEffect) + ComputeAdditiveLevelScaling(context);

            ApplyHeal(context.ApplicationTarget, healAmount, context.SpellSource);
        }
Example #4
0
 public abstract void ApplySpellEffect(SpellEffectApplicationContext context);