Core/Scripts: Add SpellInfo argument to ScriptMgr::ModifySpellDamageTaken

Port From (https://github.com/TrinityCore/TrinityCore/commit/995fb23bc11e5dff3f21e1afa977934b76482d1b)
This commit is contained in:
hondacrx
2021-03-04 14:13:48 -05:00
parent 7b5f4e610c
commit b04f34a1e1
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -1127,10 +1127,11 @@ namespace Game.Scripting
ForEach<UnitScript>(p => p.ModifyMeleeDamage(target, attacker, ref dmg));
damage = dmg;
}
public void ModifySpellDamageTaken(Unit target, Unit attacker, ref int damage)
public void ModifySpellDamageTaken(Unit target, Unit attacker, ref int damage, SpellInfo spellInfo)
{
int dmg = damage;
ForEach<UnitScript>(p => p.ModifySpellDamageTaken(target, attacker, ref dmg));
ForEach<UnitScript>(p => p.ModifySpellDamageTaken(target, attacker, ref dmg, spellInfo));
ForEach<PlayerScript>(p => p.ModifySpellDamageTaken(target, attacker, ref dmg, spellInfo));
damage = dmg;
}