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); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); Unit caster = eventInfo.GetActor(); Unit target = eventInfo.GetProcTarget(); // try to find spell Flame Shock on the target AuraEffect flameShock = target.GetAuraEffect(AuraType.PeriodicDamage, SpellFamilyNames.Shaman, new FlagArray128(0x10000000), caster.GetGUID()); if (flameShock == null) { return; } Aura flameShockAura = flameShock.GetBase(); int maxDuration = flameShockAura.GetMaxDuration(); int newDuration = flameShockAura.GetDuration() + aurEff.GetAmount() * Time.InMilliseconds; flameShockAura.SetDuration(newDuration); // is it blizzlike to change max duration for FS? if (newDuration > maxDuration) { flameShockAura.SetMaxDuration(newDuration); } }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); SpellInfo spellInfo = eventInfo.GetSpellInfo(); if (spellInfo == null) { return; } uint spellId; int chance; // Holy Light & Flash of Light if (spellInfo.SpellFamilyFlags[0].HasAnyFlag(0xC0000000)) { spellId = SpellIds.EnduringLight; chance = 15; } // Judgements else if (spellInfo.SpellFamilyFlags[0].HasAnyFlag(0x00800000u)) { spellId = SpellIds.EnduringJudgement; chance = 50; } else { return; } if (RandomHelper.randChance(chance)) { eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), spellId, true, null, aurEff); } }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); SpellInfo igniteDot = Global.SpellMgr.GetSpellInfo(SpellIds.Ignite, GetCastDifficulty()); int pct = aurEff.GetAmount(); int amount = (int)(MathFunctions.CalculatePct(eventInfo.GetDamageInfo().GetDamage(), pct) / igniteDot.GetMaxTicks()); amount += (int)eventInfo.GetProcTarget().GetRemainingPeriodicAmount(eventInfo.GetActor().GetGUID(), SpellIds.Ignite, AuraType.PeriodicDamage); CastSpellExtraArgs args = new(aurEff); args.AddSpellMod(SpellValueMod.BasePoint0, amount); GetTarget().CastSpell(eventInfo.GetProcTarget(), SpellIds.Ignite, args); }
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()); }
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); CastSpellExtraArgs args = new(aurEff); args.AddSpellMod(SpellValueMod.BasePoint0, amount); caster.CastSpell(target, SpellIds.LavaBurstBonusDamage, args); }
void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); for (uint i = 0; i < 2; ++i) { eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.WindfuryAttack, true, null, aurEff); } }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { Aura aur = eventInfo.GetProcTarget().GetAura(SpellIds.Rend, GetTarget().GetGUID()); if (aur != null) { aur.SetDuration(aur.GetSpellInfo().GetMaxDuration(), true); } }
void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); Unit target = eventInfo.GetProcTarget(); target.RemoveAurasByType(AuraType.PeriodicDamage, ObjectGuid.Empty, target.GetAura(SpellIds.PriestShadowWordDeath)); // SW:D shall not be removed. target.RemoveAurasByType(AuraType.PeriodicDamagePercent); target.RemoveAurasByType(AuraType.PeriodicLeech); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); Unit caster = GetCaster(); if (caster) { caster.CastSpell(eventInfo.GetProcTarget(), SpellIds.MarkOfBloodHeal, true); } }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); SpellInfo igniteDot = Global.SpellMgr.GetSpellInfo(SpellIds.Ignite); int pct = 8 * GetSpellInfo().GetRank(); int amount = (int)(MathFunctions.CalculatePct(eventInfo.GetDamageInfo().GetDamage(), pct) / igniteDot.GetMaxTicks(Difficulty.None)); amount += (int)eventInfo.GetProcTarget().GetRemainingPeriodicAmount(eventInfo.GetActor().GetGUID(), SpellIds.Ignite, AuraType.PeriodicDamage); GetTarget().CastCustomSpell(SpellIds.Ignite, SpellValueMod.BasePoint0, amount, eventInfo.GetProcTarget(), true, null, aurEff); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); float ap = GetTarget().GetTotalAttackPowerValue(WeaponAttackType.BaseAttack); int holy = GetTarget().SpellBaseDamageBonusDone(SpellSchoolMask.Holy); holy += eventInfo.GetProcTarget().SpellBaseDamageBonusTaken(SpellSchoolMask.Holy); int bp = (int)((ap * 0.022f + 0.044f * holy) * GetTarget().GetBaseAttackTime(WeaponAttackType.BaseAttack) / 1000); GetTarget().CastCustomSpell(SpellIds.SealOfCommand, SpellValueMod.BasePoint0, bp, eventInfo.GetProcTarget(), true, null, aurEff); }
bool CheckProc(ProcEventInfo eventInfo) { if (eventInfo.GetProcTarget() == GetTarget()) { return(false); } if (eventInfo.GetDamageInfo().GetSpellInfo() == null || (eventInfo.GetDamageInfo().GetSpellInfo().GetAllEffectsMechanicMask() & ((1 << (int)Mechanics.Root) | (1 << (int)Mechanics.Stun))) == 0) { return(false); } return(true); }
void HandleEffectDispelProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); // Proc only with Cure Disease if (eventInfo.GetDamageInfo().GetSpellInfo().Id != SpellIds.CureDisease || eventInfo.GetProcTarget() != GetTarget()) { return; } if (RandomHelper.randChance(aurEff.GetAmount())) { GetTarget().CastSpell(eventInfo.GetProcTarget(), SpellIds.BodyAndSoulDispel, true, null, aurEff); } }
bool DoCheck(ProcEventInfo eventInfo) { Aura aura = eventInfo.GetProcTarget().GetAura(SpellIds.Slow); if (aura != null) { if (aura.GetCasterGUID() != GetTarget().GetGUID()) { return(false); } } return(true); }
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); }
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); }
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); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); uint spellId; Unit caster = eventInfo.GetActor(); Unit target = eventInfo.GetProcTarget(); switch (target.GetClass()) { case Class.Paladin: case Class.Priest: case Class.Shaman: case Class.Druid: spellId = SpellIds.HolyPowerMp5; break; case Class.Mage: case Class.Warlock: spellId = SpellIds.HolyPowerSpellPower; break; case Class.Hunter: case Class.Rogue: spellId = SpellIds.HolyPowerAttackPower; break; case Class.Warrior: spellId = SpellIds.HolyPowerArmor; break; default: return; } caster.CastSpell(target, spellId, true, null, aurEff); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); DamageInfo damageInfo = eventInfo.GetDamageInfo(); if (damageInfo == null || damageInfo.GetDamage() == 0) { return; } SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.Electrified, 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.Electrified, AuraType.PeriodicDamage); caster.CastCustomSpell(SpellIds.Electrified, SpellValueMod.BasePoint0, amount, target, true, null, aurEff); }
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); }
bool CheckProc(ProcEventInfo eventInfo) { return(eventInfo.GetProcTarget()); }
void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); DamageInfo damageInfo = eventInfo.GetDamageInfo(); if (damageInfo == null || damageInfo.GetDamage() == 0) { return; } int damage = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount()); GetTarget().CastCustomSpell(SpellIds.EyeForAnEyeDamage, SpellValueMod.BasePoint0, damage, eventInfo.GetProcTarget(), true, null, aurEff); }
void HandleEffectSpeedProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); // Proc only with Power Word: Shield or Leap of Faith if (!(eventInfo.GetDamageInfo().GetSpellInfo().SpellFamilyFlags[0].HasAnyFlag(0x1u) || eventInfo.GetDamageInfo().GetSpellInfo().SpellFamilyFlags[2].HasAnyFlag(0x80000u))) { return; } GetTarget().CastCustomSpell(SpellIds.BodyAndSoulSpeed, SpellValueMod.BasePoint0, aurEff.GetAmount(), eventInfo.GetProcTarget(), true, null, aurEff); }
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); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); GetTarget().CastSpell(eventInfo.GetProcTarget(), SpellIds.ItemLightningShield, true, null, aurEff); }
void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); _procTargetGuid = eventInfo.GetProcTarget().GetGUID(); eventInfo.GetActor().CastSpell(eventInfo.GetActor(), SpellIds.EarthenRagePeriodic, true); }
void onProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); GetTarget().CastSpell(eventInfo.GetProcTarget(), SpellIds.GlyphOfShadowflame, true, null, aurEff); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.BlessingOfTheClaw, true, null, aurEff); }
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); }