Exemplo n.º 1
0
        void HandleDispel(DispelInfo dispelInfo)
        {
            Unit target = GetUnitOwner();

            if (target != null)
            {
                AuraEffect aurEff = GetEffect(1);
                if (aurEff != null)
                {
                    // final heal
                    uint healAmount = (uint)aurEff.GetAmount();
                    Unit caster     = GetCaster();
                    if (caster != null)
                    {
                        healAmount = caster.SpellHealingBonusDone(target, GetSpellInfo(), healAmount, DamageEffectType.Heal, aurEff.GetSpellEffectInfo(), dispelInfo.GetRemovedCharges());
                        healAmount = target.SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, DamageEffectType.Heal, aurEff.GetSpellEffectInfo(), dispelInfo.GetRemovedCharges());
                        target.CastCustomSpell(target, SpellIds.LifebloomFinalHeal, (int)healAmount, 0, 0, true, null, null, GetCasterGUID());

                        // restore mana
                        var costs = GetSpellInfo().CalcPowerCost(caster, GetSpellInfo().GetSchoolMask());
                        var m     = costs.Find(cost => cost.Power == PowerType.Mana);
                        if (m != null)
                        {
                            int returnMana = m.Amount * dispelInfo.GetRemovedCharges() / 2;
                            caster.CastCustomSpell(caster, SpellIds.LifebloomEnergize, returnMana, 0, 0, true, null, null, GetCasterGUID());
                        }
                        return;
                    }

                    target.CastCustomSpell(target, SpellIds.LifebloomFinalHeal, (int)healAmount, 0, 0, true, null, null, GetCasterGUID());
                }
            }
        }
Exemplo n.º 2
0
        void HandleDispel(DispelInfo dispelInfo)
        {
            Unit caster = GetCaster();

            if (caster)
            {
                AuraEffect aurEff = GetEffect(1);
                if (aurEff != null)
                {
                    int damage = aurEff.GetAmount() * 9;
                    // backfire damage and silence
                    caster.CastCustomSpell(dispelInfo.GetDispeller(), SpellIds.UnstableAfflictionDispel, damage, 0, 0, true, null, aurEff);
                }
            }
        }
Exemplo n.º 3
0
        void HandleDispel(DispelInfo dispelInfo)
        {
            Unit caster = GetCaster();

            if (caster)
            {
                AuraEffect aurEff = GetEffect(1);
                if (aurEff != null)
                {
                    // backfire damage and silence
                    CastSpellExtraArgs args = new(aurEff);
                    args.AddSpellMod(SpellValueMod.BasePoint0, aurEff.GetAmount() * 9);
                    caster.CastSpell(dispelInfo.GetDispeller(), SpellIds.UnstableAfflictionDispel, args);
                }
            }
        }
Exemplo n.º 4
0
        void HandleDispel(DispelInfo dispelInfo)
        {
            Unit caster = GetCaster();

            if (caster)
            {
                Unit target = GetUnitOwner();
                if (target)
                {
                    AuraEffect aurEff = GetEffect(1);
                    if (aurEff != null)
                    {
                        int damage = aurEff.GetAmount() * 8;
                        // backfire damage
                        caster.CastCustomSpell(target, SpellIds.VampiricTouchDispel, damage, 0, 0, true, null, aurEff);
                    }
                }
            }
        }
Exemplo n.º 5
0
        void HandleDispel(DispelInfo dispelInfo)
        {
            Unit caster = GetCaster();

            if (caster)
            {
                Unit target = GetUnitOwner();
                if (target)
                {
                    AuraEffect aurEff = GetEffect(1);
                    if (aurEff != null)
                    {
                        // backfire damage
                        CastSpellExtraArgs args = new(aurEff);
                        args.AddSpellMod(SpellValueMod.BasePoint0, aurEff.GetAmount() * 8);
                        caster.CastSpell(target, SpellIds.VampiricTouchDispel, args);
                    }
                }
            }
        }