Example #1
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            DamageInfo damageInfo = eventInfo.GetDamageInfo();

            if (damageInfo == null || damageInfo.GetDamage() == 0)
            {
                return;
            }

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.LavaBurstBonusDamage, GetCastDifficulty());
            int       amount    = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount());

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

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

            amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.LavaBurstBonusDamage, AuraType.PeriodicDamage);

            caster.CastCustomSpell(SpellIds.LavaBurstBonusDamage, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
        }
Example #2
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);
            int       amount    = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

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

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

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

            caster.CastCustomSpell(SpellIds.ChainedHeal, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
        }
Example #3
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();

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

            CastSpellExtraArgs args = new(aurEff);

            args.AddSpellMod(SpellValueMod.BasePoint0, amount);
            caster.CastSpell(target, SpellIds.ChainedHeal, args);
        }
Example #4
0
            bool CheckProc(ProcEventInfo eventInfo)
            {
                Unit caster = eventInfo.GetActor();

                if (caster)
                {
                    if (!caster.IsTypeId(TypeId.Player) || caster.GetClass() != Class.Deathknight)
                    {
                        return(false);
                    }

                    for (byte i = 0; i < PlayerConst.MaxRunes; ++i)
                    {
                        if (caster.ToPlayer().GetRuneCooldown(i) == 0)
                        {
                            return(false);
                        }
                    }

                    return(true);
                }

                return(false);
            }
Example #5
0
 void onProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(eventInfo.GetProcTarget(), SpellIds.GlyphOfShadowflame, true, null, aurEff);
 }
Example #6
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     GetTarget().CastSpell(eventInfo.GetActor(), SpellIds.CracklingJadeLightningKnockback, TriggerCastFlags.FullMask);
     GetTarget().CastSpell(GetTarget(), SpellIds.CracklingJadeLightningKnockbackCd, TriggerCastFlags.FullMask);
 }
Example #7
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     _procTarget = GetTarget().GetOwner();
     return(_procTarget);
 }
Example #8
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(GetTarget(), SpellIds.ItemLightningShieldDamage, true, null, aurEff);
 }
Example #9
0
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(GetTarget(), SpellIds.LavaSurge, true);
 }
Example #10
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().GetSpellHistory().ModifyCooldown(SpellIds.Exhilaration, -TimeSpan.FromSeconds(aurEff.GetAmount()));
     GetTarget().GetSpellHistory().ModifyCooldown(SpellIds.ExhilarationPet, -TimeSpan.FromSeconds(aurEff.GetAmount()));
 }
Example #11
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            GetTarget().CastSpell(GetTarget(), SpellIds.EarthShieldHeal, true, null, aurEff, GetCasterGUID());
        }
Example #12
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.BlessingOfTheClaw, true, null, aurEff);
 }
Example #13
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActor().CastSpell((Unit)null, SpellIds.Infusion, true, null, aurEff);
 }
Example #14
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastCustomSpell(SpellIds.LivingSeedHeal, SpellValueMod.BasePoint0, aurEff.GetAmount(), GetTarget(), true, null, aurEff);
 }
Example #15
0
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().RemoveMovementImpairingAuras();
 }
Example #16
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(_procTarget, SpellIds.ManaLeechProc, true, null, aurEff);
 }
Example #17
0
 void onProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastCustomSpell(SpellIds.ImprovedSoulFirePct, SpellValueMod.BasePoint0, aurEff.GetAmount(), GetTarget(), true, null, aurEff);
     GetTarget().CastSpell(GetTarget(), SpellIds.ImprovedSoulFireState, true, null, aurEff);
 }
Example #18
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(GetTarget(), SpellIds.ImprovedMendPet, true, null, aurEff);
 }
Example #19
0
 void onProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     GetTarget().CastSpell((Unit)null, SpellIds.GenReplenishment, true, null, aurEff);
 }
Example #20
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(GetTarget().GetRedirectThreatTarget());
 }
Example #21
0
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     _procTargetGuid = eventInfo.GetProcTarget().GetGUID();
     eventInfo.GetActor().CastSpell(eventInfo.GetActor(), SpellIds.EarthenRagePeriodic, true);
 }
Example #22
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(GetTarget().IsTypeId(TypeId.Player));
 }
Example #23
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(eventInfo.GetProcSpell() != null);
 }
Example #24
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(GetTarget(), SpellIds.ItemHealingTrance, true, null, aurEff);
 }
Example #25
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(GetTarget(), SpellIds.MisdirectionProc, true, null, aurEff);
 }
Example #26
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(eventInfo.GetDamageInfo() != null);
 }
Example #27
0
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     GetTarget().GetSpellHistory().ResetCooldown(SpellIds.AvengersShield, true);
 }
Example #28
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(RandomHelper.randChance(GetEffect(0).GetAmount()));
 }
Example #29
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(eventInfo.GetProcTarget());
 }
Example #30
0
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     GetTarget().CastSpell(GetTarget(), SpellIds.LockAndLoad, true, null, aurEff);
 }