示例#1
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();
            int amount = (int)MathFunctions.CalculatePct(eventInfo.GetHealInfo().GetHeal(), aurEff.GetAmount());

            GetTarget().CastCustomSpell(SpellIds.LivingSeedProc, SpellValueMod.BasePoint0, amount, eventInfo.GetProcTarget(), true, null, aurEff);
        }
示例#2
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            uint heal = MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            var auras = GetCaster().GetSingleCastAuras();

            foreach (var eff in auras)
            {
                if (eff.GetId() == SpellIds.BeaconOfLight)
                {
                    List <AuraApplication> applications = eff.GetApplicationList();
                    if (!applications.Empty())
                    {
                        eventInfo.GetActor().CastCustomSpell(SpellIds.BeaconOfLightHeal, SpellValueMod.BasePoint0, (int)heal, applications.First().GetTarget(), true);
                    }
                    return;
                }
            }
        }
示例#3
0
        bool CheckProc(ProcEventInfo eventInfo)
        {
            SpellInfo spellInfo = eventInfo.GetSpellInfo();

            if (spellInfo == null || spellInfo.Id == SpellIds.RejuvenationT10Proc)
            {
                return(false);
            }

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return(false);
            }

            Player caster = eventInfo.GetActor().ToPlayer();

            if (!caster)
            {
                return(false);
            }

            return(caster.GetGroup() || caster != eventInfo.GetProcTarget());
        }
示例#4
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            int absorb = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            // Multiple effects stack, so let's try to find this aura.
            AuraEffect aegis = eventInfo.GetProcTarget().GetAuraEffect(SpellIds.DivineAegis, 0);

            if (aegis != null)
            {
                absorb += aegis.GetAmount();
            }

            absorb = (int)Math.Min(absorb, eventInfo.GetProcTarget().getLevel() * 125);

            GetTarget().CastCustomSpell(SpellIds.DivineAegis, SpellValueMod.BasePoint0, absorb, eventInfo.GetProcTarget(), true, null, aurEff);
        }
示例#5
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.ChainedHeal, GetCastDifficulty());
            int       amount    = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            amount /= (int)spellInfo.GetMaxTicks();

            // Add remaining ticks to healing done
            Unit caster = eventInfo.GetActor();
            Unit target = eventInfo.GetProcTarget();

            amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.ChainedHeal, AuraType.PeriodicHeal);

            CastSpellExtraArgs args = new(aurEff);

            args.AddSpellMod(SpellValueMod.BasePoint0, amount);
            caster.CastSpell(target, SpellIds.ChainedHeal, args);
        }
示例#6
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     if (eventInfo.GetHealInfo().GetSpellInfo().Id == SpellIds.AncestralGuidanceHeal)
     {
         return(false);
     }
     return(true);
 }
示例#7
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            int amount = (int)eventInfo.GetHealInfo().GetHeal();

            eventInfo.GetActor().CastCustomSpell(SpellIds.RejuvenationT10Proc, SpellValueMod.BasePoint0, amount, null, true, null, aurEff);
        }
示例#8
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            SpellInfo triggeredSpellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.GlyphOfPrayerOfHealingHeal);
            int       heal = (int)(MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount()) / triggeredSpellInfo.GetMaxTicks(Difficulty.None));

            GetTarget().CastCustomSpell(SpellIds.GlyphOfPrayerOfHealingHeal, SpellValueMod.BasePoint0, heal, eventInfo.GetProcTarget(), true, null, aurEff);
        }
示例#9
0
        bool CheckProc(ProcEventInfo eventInfo)
        {
            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo != null)
            {
                Unit healTarget = healInfo.GetTarget();
                if (healTarget)
                {
                    // @todo: fix me later if (healInfo.GetEffectiveHeal())
                    if (healTarget.GetHealth() >= healTarget.GetMaxHealth())
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
示例#10
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();
            Unit caster = eventInfo.GetActor();

            if (caster == eventInfo.GetProcTarget())
            {
                return;
            }

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            int amount = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), 10);

            caster.CastCustomSpell(SpellIds.OracularHeal, SpellValueMod.BasePoint0, amount, caster, true);
        }
示例#11
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();
            Unit caster = eventInfo.GetActor();

            if (caster == eventInfo.GetProcTarget())
            {
                return;
            }

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            CastSpellExtraArgs args = new(aurEff);

            args.AddSpellMod(SpellValueMod.BasePoint0, (int)MathFunctions.CalculatePct(healInfo.GetHeal(), 10));
            caster.CastSpell(caster, SpellIds.OracularHeal, args);
        }
示例#12
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            Unit caster = eventInfo.GetActor();
            Unit target = eventInfo.GetProcTarget();

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.HolyMending);
            int       amount    = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            amount /= (int)spellInfo.GetMaxTicks(Difficulty.None);
            // Add remaining ticks to damage done
            amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.HolyMending, AuraType.PeriodicHeal);

            caster.CastCustomSpell(SpellIds.HolyMending, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
        }
示例#13
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            Unit caster = eventInfo.GetActor();
            Unit target = eventInfo.GetProcTarget();

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.HolyMending, GetCastDifficulty());
            int       amount    = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            amount /= (int)spellInfo.GetMaxTicks();

            CastSpellExtraArgs args = new(aurEff);

            args.AddSpellMod(SpellValueMod.BasePoint0, amount);
            caster.CastSpell(target, SpellIds.HolyMending, args);
        }