Core/Spell: restore old proc system behaviour on auras self proc.
This commit is contained in:
@@ -623,7 +623,7 @@ namespace Scripts.Spells.Druid
|
||||
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.BlessingOfTheClaw, true);
|
||||
eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.BlessingOfTheClaw, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -654,7 +654,7 @@ namespace Scripts.Spells.Druid
|
||||
return;
|
||||
|
||||
int amount = MathFunctions.CalculatePct(m.Amount, aurEff.GetAmount());
|
||||
caster.CastCustomSpell(SpellIds.Exhilarate, SpellValueMod.BasePoint0, amount, (Unit)null, true);
|
||||
caster.CastCustomSpell(SpellIds.Exhilarate, SpellValueMod.BasePoint0, amount, null, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -675,7 +675,7 @@ namespace Scripts.Spells.Druid
|
||||
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor().CastSpell((Unit)null, SpellIds.Infusion, true);
|
||||
eventInfo.GetActor().CastSpell((Unit)null, SpellIds.Infusion, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -724,7 +724,7 @@ namespace Scripts.Spells.Druid
|
||||
return;
|
||||
|
||||
if (RandomHelper.randChance(chance))
|
||||
eventInfo.GetActor().CastSpell((Unit)null, spellId, true);
|
||||
eventInfo.GetActor().CastSpell((Unit)null, spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -758,7 +758,7 @@ namespace Scripts.Spells.Druid
|
||||
// Add remaining ticks to damage done
|
||||
amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.Languish, AuraType.PeriodicDamage);
|
||||
|
||||
caster.CastCustomSpell(SpellIds.Languish, SpellValueMod.BasePoint0, amount, target, true);
|
||||
caster.CastCustomSpell(SpellIds.Languish, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -840,7 +840,7 @@ namespace Scripts.Spells.Druid
|
||||
PreventDefaultAction();
|
||||
|
||||
int amount = (int)eventInfo.GetHealInfo().GetHeal();
|
||||
eventInfo.GetActor().CastCustomSpell(SpellIds.RejuvenationT10Proc, SpellValueMod.BasePoint0, amount, (Unit)null, true);
|
||||
eventInfo.GetActor().CastCustomSpell(SpellIds.RejuvenationT10Proc, SpellValueMod.BasePoint0, amount, null, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -2710,7 +2710,7 @@ namespace Scripts.Spells.Generic
|
||||
|
||||
Unit caster = eventInfo.GetActor();
|
||||
int bp = (int)(damageInfo.GetDamage() / 2);
|
||||
caster.CastCustomSpell(SpellIds.VampiricTouchHeal, SpellValueMod.BasePoint0, bp, caster, true);
|
||||
caster.CastCustomSpell(SpellIds.VampiricTouchHeal, SpellValueMod.BasePoint0, bp, caster, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -610,7 +610,7 @@ namespace Scripts.Spells.Items
|
||||
if (player.GetWeaponForAttack(WeaponAttackType.OffAttack, true) && RandomHelper.URand(0, 1) != 0)
|
||||
spellId = SpellIds.ManifestAngerOffHand;
|
||||
|
||||
caster.CastSpell(target, spellId, true);
|
||||
caster.CastSpell(target, spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -680,7 +680,7 @@ namespace Scripts.Spells.Items
|
||||
PreventDefaultAction();
|
||||
Unit caster = eventInfo.GetActor();
|
||||
uint spellId = triggeredSpells[(int)caster.GetClass()].SelectRandom();
|
||||
caster.CastSpell(caster, spellId, true);
|
||||
caster.CastSpell(caster, spellId, true, null, aurEff);
|
||||
|
||||
if (RandomHelper.randChance(10))
|
||||
caster.Say(TextIds.SayMadness);
|
||||
@@ -703,7 +703,7 @@ namespace Scripts.Spells.Items
|
||||
void HandlePeriodicDummy(AuraEffect aurEff)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget().CastSpell(GetTarget(), RandomHelper.RAND(SpellIds.DementiaPos, SpellIds.DementiaNeg), true);
|
||||
GetTarget().CastSpell(GetTarget(), RandomHelper.RAND(SpellIds.DementiaPos, SpellIds.DementiaNeg), true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -849,7 +849,7 @@ namespace Scripts.Spells.Items
|
||||
return;
|
||||
|
||||
uint spellId = randomSpells.SelectRandom();
|
||||
caster.CastSpell(caster, spellId, true);
|
||||
caster.CastSpell(caster, spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -1115,7 +1115,7 @@ namespace Scripts.Spells.Items
|
||||
|
||||
int amount = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount());
|
||||
Unit caster = eventInfo.GetActor();
|
||||
caster.CastCustomSpell(SpellIds.Shadowmend, SpellValueMod.BasePoint0, amount, (Unit)null, true);
|
||||
caster.CastCustomSpell(SpellIds.Shadowmend, SpellValueMod.BasePoint0, amount, null, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -1140,9 +1140,9 @@ namespace Scripts.Spells.Items
|
||||
if (target)
|
||||
{
|
||||
if (RandomHelper.URand(0, 99) < 15)
|
||||
caster.CastSpell(caster, SpellIds.GnomishDeathRaySelf, true, null); // failure
|
||||
caster.CastSpell(caster, SpellIds.GnomishDeathRaySelf, true); // failure
|
||||
else
|
||||
caster.CastSpell(target, SpellIds.GnomishDeathRayTarget, true, null);
|
||||
caster.CastSpell(target, SpellIds.GnomishDeathRayTarget, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1191,6 +1191,7 @@ namespace Scripts.Spells.Items
|
||||
case PowerType.Rage:
|
||||
spellId = _rageSpellId;
|
||||
break;
|
||||
// Death Knights can't use daggers, but oh well
|
||||
case PowerType.RunicPower:
|
||||
spellId = _rpSpellId;
|
||||
break;
|
||||
@@ -1198,7 +1199,7 @@ namespace Scripts.Spells.Items
|
||||
return;
|
||||
}
|
||||
|
||||
caster.CastSpell((Unit)null, spellId, true);
|
||||
caster.CastSpell((Unit)null, spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -1300,7 +1301,7 @@ namespace Scripts.Spells.Items
|
||||
// in that case, do not cast heal spell
|
||||
PreventDefaultAction();
|
||||
// but mana instead
|
||||
eventInfo.GetActor().CastSpell((Unit)null, SpellIds.MarkOfConquestEnergize, true);
|
||||
eventInfo.GetActor().CastSpell((Unit)null, SpellIds.MarkOfConquestEnergize, true, null, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1529,7 +1530,7 @@ namespace Scripts.Spells.Items
|
||||
|
||||
int bp = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount());
|
||||
Unit caster = eventInfo.GetActor();
|
||||
caster.CastCustomSpell(SpellIds.HealthLink, SpellValueMod.BasePoint0, bp, (Unit)null, true);
|
||||
caster.CastCustomSpell(SpellIds.HealthLink, SpellValueMod.BasePoint0, bp, null, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -1825,7 +1826,7 @@ namespace Scripts.Spells.Items
|
||||
|
||||
Unit caster = eventInfo.GetActor();
|
||||
int amount = (int)caster.CountPctFromMaxHealth(aurEff.GetAmount());
|
||||
caster.CastCustomSpell(SpellIds.SwiftHandOfJusticeHeal, SpellValueMod.BasePoint0, amount, (Unit)null, true);
|
||||
caster.CastCustomSpell(SpellIds.SwiftHandOfJusticeHeal, SpellValueMod.BasePoint0, amount, null, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -2725,10 +2726,10 @@ namespace Scripts.Spells.Items
|
||||
Unit target = eventInfo.GetProcTarget();
|
||||
|
||||
if (eventInfo.GetTypeMask().HasAnyFlag(ProcFlags.DoneSpellMagicDmgClassPos))
|
||||
caster.CastSpell(target, _healProcSpellId, true);
|
||||
caster.CastSpell(target, _healProcSpellId, true, null, aurEff);
|
||||
|
||||
if (eventInfo.GetTypeMask().HasAnyFlag(ProcFlags.DoneSpellMagicDmgClassNeg))
|
||||
caster.CastSpell(target, _damageProcSpellId, true);
|
||||
caster.CastSpell(target, _damageProcSpellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -2812,10 +2813,10 @@ namespace Scripts.Spells.Items
|
||||
|
||||
// Aggression checks are in the spell system... just cast and forget
|
||||
if (player.GetReputationRank(FactionIds.Aldor) == ReputationRank.Exalted)
|
||||
player.CastSpell(target, _aldorSpellId, true);
|
||||
player.CastSpell(target, _aldorSpellId, true, null, aurEff);
|
||||
|
||||
if (player.GetReputationRank(FactionIds.Scryers) == ReputationRank.Exalted)
|
||||
player.CastSpell(target, _scryersSpellId, true);
|
||||
player.CastSpell(target, _scryersSpellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -567,7 +567,7 @@ namespace Scripts.Spells.Paladin
|
||||
return;
|
||||
|
||||
if (RandomHelper.randChance(chance))
|
||||
eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), spellId, true);
|
||||
eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -895,7 +895,7 @@ namespace Scripts.Spells.Paladin
|
||||
return;
|
||||
}
|
||||
|
||||
caster.CastSpell(target, spellId, true);
|
||||
caster.CastSpell(target, spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -929,7 +929,7 @@ namespace Scripts.Spells.Paladin
|
||||
// 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);
|
||||
caster.CastCustomSpell(SpellIds.HolyMending, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace Scripts.Spells.Priest
|
||||
return;
|
||||
|
||||
int amount = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), 10);
|
||||
caster.CastCustomSpell(SpellIds.OracularHeal, SpellValueMod.BasePoint0, amount, caster, true);
|
||||
caster.CastCustomSpell(SpellIds.OracularHeal, SpellValueMod.BasePoint0, amount, caster, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -936,7 +936,7 @@ namespace Scripts.Spells.Priest
|
||||
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.ArmorOfFaith, true);
|
||||
eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.ArmorOfFaith, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -1006,7 +1006,7 @@ namespace Scripts.Spells.Priest
|
||||
Unit target = eventInfo.GetProcTarget();
|
||||
amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.BlessedHealing, AuraType.PeriodicHeal);
|
||||
|
||||
caster.CastCustomSpell(SpellIds.BlessedHealing, SpellValueMod.BasePoint0, amount, target, true);
|
||||
caster.CastCustomSpell(SpellIds.BlessedHealing, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -728,7 +728,7 @@ namespace Scripts.Spells.Shaman
|
||||
return;
|
||||
}
|
||||
|
||||
caster.CastSpell(target, spellId, true);
|
||||
caster.CastSpell(target, spellId, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -757,12 +757,12 @@ namespace Scripts.Spells.Shaman
|
||||
int amount = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount());
|
||||
amount /= (int)spellInfo.GetMaxTicks(Difficulty.None);
|
||||
|
||||
// Add remaining ticks to healing done
|
||||
// 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);
|
||||
caster.CastCustomSpell(SpellIds.Electrified, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -791,12 +791,12 @@ namespace Scripts.Spells.Shaman
|
||||
int amount = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount());
|
||||
amount /= (int)spellInfo.GetMaxTicks(Difficulty.None);
|
||||
|
||||
// Add remaining ticks to healing done
|
||||
// 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);
|
||||
caster.CastCustomSpell(SpellIds.LavaBurstBonusDamage, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -862,7 +862,7 @@ namespace Scripts.Spells.Shaman
|
||||
Unit target = eventInfo.GetProcTarget();
|
||||
amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.ChainedHeal, AuraType.PeriodicHeal);
|
||||
|
||||
caster.CastCustomSpell(SpellIds.ChainedHeal, SpellValueMod.BasePoint0, amount, target, true);
|
||||
caster.CastCustomSpell(SpellIds.ChainedHeal, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -746,7 +746,7 @@ namespace Scripts.Spells.Warlock
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
caster.CastSpell(eventInfo.GetActionTarget(), SpellIds.SeedOfCorruptionGeneric, true);
|
||||
caster.CastSpell(eventInfo.GetActionTarget(), SpellIds.SeedOfCorruptionGeneric, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
@@ -982,7 +982,7 @@ namespace Scripts.Spells.Warlock
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit caster = eventInfo.GetActor();
|
||||
caster.CastSpell(caster, _triggerSpell, true);
|
||||
caster.CastSpell(caster, _triggerSpell, true, null, aurEff);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
Reference in New Issue
Block a user