bool CheckProc(ProcEventInfo eventInfo) { if (!eventInfo.GetActionTarget()) { return(false); } if (eventInfo.GetActionTarget().HasAura(SpellIds.BeaconOfLight, eventInfo.GetActor().GetGUID())) { return(false); } return(true); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); DamageInfo damageInfo = eventInfo.GetDamageInfo(); if (damageInfo == null || damageInfo.GetDamage() == 0) { return; } int amount = aurEff.GetAmount() - (int)damageInfo.GetDamage(); if (amount > 0) { aurEff.SetAmount(amount); return; } Remove(); Unit caster = GetCaster(); if (!caster) { return; } caster.CastSpell(eventInfo.GetActionTarget(), SpellIds.SeedOfCorruptionGeneric, true, null, aurEff); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); DamageInfo damageInfo = eventInfo.GetDamageInfo(); if (damageInfo == null || damageInfo.GetDamage() == 0) { return; } int amount = (int)(aurEff.GetAmount() - damageInfo.GetDamage()); if (amount > 0) { aurEff.SetAmount(amount); if (!GetTarget().HealthBelowPctDamaged(1, damageInfo.GetDamage())) { return; } } Remove(); Unit caster = GetCaster(); if (!caster) { return; } caster.CastSpell(eventInfo.GetActionTarget(), SpellIds.SeedOfCorruptionDamage, true); }
bool CheckProc(ProcEventInfo eventInfo) { if (eventInfo.GetActionTarget().GetEntry() != InstanceCreatureIds.XS013Scrapbot) { return(false); } return(true); }
void HandleProc(ProcEventInfo eventInfo) { PreventDefaultAction(); Unit target = eventInfo.GetActionTarget(); int bp0 = (int)MathFunctions.CalculatePct(target.GetMaxHealth(), GetSpellInfo().GetEffect(1).CalcValue()); target.CastCustomSpell(SpellIds.Stoicism, SpellValueMod.BasePoint0, bp0, (Unit)null, true); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { Unit target = eventInfo.GetActionTarget(); //Get the Remaining Damage from the aura (if exist) int remainingDamage = (int)target.GetRemainingPeriodicAmount(target.GetGUID(), SpellIds.TraumaEffect, AuraType.PeriodicDamage); //Get 25% of damage from the spell casted (Slam & Whirlwind) plus Remaining Damage from Aura int damage = (int)(MathFunctions.CalculatePct(eventInfo.GetDamageInfo().GetDamage(), aurEff.GetAmount()) / Global.SpellMgr.GetSpellInfo(SpellIds.TraumaEffect).GetMaxTicks(Difficulty.None)) + remainingDamage; GetCaster().CastCustomSpell(SpellIds.TraumaEffect, SpellValueMod.BasePoint0, damage, target, true); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { Unit target = eventInfo.GetActionTarget(); //Get 25% of damage from the spell casted (Slam & Whirlwind) plus Remaining Damage from Aura int damage = (int)(MathFunctions.CalculatePct(eventInfo.GetDamageInfo().GetDamage(), aurEff.GetAmount()) / Global.SpellMgr.GetSpellInfo(SpellIds.TraumaEffect, GetCastDifficulty()).GetMaxTicks()); CastSpellExtraArgs args = new(TriggerCastFlags.FullMask); args.AddSpellMod(SpellValueMod.BasePoint0, damage); GetCaster().CastSpell(target, SpellIds.TraumaEffect, args); }
void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); Unit attacker = eventInfo.GetActor(); CastSpellExtraArgs args = new(aurEff); args.AddSpellMod(SpellValueMod.BasePoint0, Math.Max(1, (int)(attacker.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * 0.0264f))); attacker.CastSpell(eventInfo.GetActionTarget(), SpellIds.FlametongueAttack, args); }
void HandleProc(ProcEventInfo eventInfo) { PreventDefaultAction(); Unit target = eventInfo.GetActionTarget(); int bp0 = (int)MathFunctions.CalculatePct(target.GetMaxHealth(), GetSpellInfo().GetEffect(1).CalcValue()); CastSpellExtraArgs args = new(TriggerCastFlags.FullMask); args.AddSpellMod(SpellValueMod.BasePoint0, bp0); target.CastSpell((Unit)null, SpellIds.Stoicism, args); }
bool CheckProc(ProcEventInfo eventInfo) { if (eventInfo.GetActionTarget().HealthBelowPct(20)) { return(true); } DamageInfo damageInfo = eventInfo.GetDamageInfo(); if (damageInfo != null && damageInfo.GetDamage() != 0) { if (GetTarget().HealthBelowPctDamaged(20, damageInfo.GetDamage())) { return(true); } } return(false); }
void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); Unit attacker = eventInfo.GetActor(); int damage = (int)(attacker.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * 0.12f / 2600 * attacker.GetBaseAttackTime(WeaponAttackType.BaseAttack)); attacker.CastCustomSpell(SpellIds.FlametongueAttack, SpellValueMod.BasePoint0, damage, eventInfo.GetActionTarget(), TriggerCastFlags.FullMask, null, aurEff); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); eventInfo.GetActionTarget().CastSpell((Unit)null, SpellIds.RunicReturn, true); }
bool CheckProc(ProcEventInfo eventInfo) { return(eventInfo.GetActor() == eventInfo.GetActionTarget()); }
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo) { return(eventInfo.GetActionTarget().HealthBelowPct(aurEff.GetAmount())); }