Esempio n. 1
0
        /// <summary>Applies this AreaAura's effects to the given target</summary>
        protected void ApplyAuraEffects(Unit target)
        {
            bool flag = this.m_spell.IsBeneficialFor(this.m_CasterReference, (WorldObject)target);

            if (SpellCast.CheckDebuffResist(target, this.m_spell, this.m_CasterReference.Level, !flag) !=
                CastMissReason.None)
            {
                return;
            }
            Aura aura = target.Auras.CreateAura(this.m_CasterReference, this.m_spell, (Item)null);

            if (aura == null)
            {
                return;
            }
            aura.Start(this.m_controller, false);
            this.m_targets.Add(target, aura);
        }
Esempio n. 2
0
        /// <summary>
        /// Applies this AreaAura's effects to the given target
        /// </summary>
        protected void ApplyAuraEffects(Unit target)
        {
            var beneficial = m_spell.IsBeneficialFor(m_CasterReference, target);

            // checks
            var missReason = SpellCast.CheckDebuffResist(target, m_spell, m_CasterReference.Level, !beneficial);

            if (missReason != CastMissReason.None)
            {
                // TODO: Flash message ontop of the head
                return;
            }

            // try to stack/apply aura
            var aura = target.Auras.CreateAura(m_CasterReference, m_spell);

            if (aura != null)
            {
                aura.Start(m_controller, false);
                m_targets.Add(target, aura);
            }
        }