Core/Scripts: Added SpellEffectInfo argument to CalcDamage and CalcHealing spell script hooks

Port From (https://github.com/TrinityCore/TrinityCore/commit/884662a75a901af6f61cab9efc171d052e8042f4)
This commit is contained in:
Hondacrx
2025-05-19 11:01:52 -04:00
parent 6097bf92cc
commit 94877fed77
13 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -3876,7 +3876,7 @@ namespace Game.Entities
return (uint)Math.Max(damage * (1.0f - mitigation), 0.0f);
}
public int MeleeDamageBonusDone(Unit victim, int damage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo spellProto = null, Mechanics mechanic = default, SpellSchoolMask damageSchoolMask = SpellSchoolMask.Normal, Spell spell = null, AuraEffect aurEff = null)
public int MeleeDamageBonusDone(Unit victim, int damage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo spellProto = null, SpellEffectInfo spellEffectInfo = null, Mechanics mechanic = default, SpellSchoolMask damageSchoolMask = SpellSchoolMask.Normal, Spell spell = null, AuraEffect aurEff = null)
{
if (victim == null || damage == 0)
return 0;
@@ -3976,7 +3976,7 @@ namespace Game.Entities
MathFunctions.AddPct(ref DoneTotalMod, GetTotalAuraModifierByMiscValue(AuraType.ModDamageDoneForMechanic, (int)spellProto.Mechanic));
if (spell != null)
spell.CallScriptCalcDamageHandlers(victim, ref damage, ref DoneFlatBenefit, ref DoneTotalMod);
spell.CallScriptCalcDamageHandlers(spellEffectInfo, victim, ref damage, ref DoneFlatBenefit, ref DoneTotalMod);
else if (aurEff != null)
aurEff.GetBase().CallScriptCalcDamageAndHealingHandlers(aurEff, aurEff.GetBase().GetApplicationOfTarget(victim.GetGUID()), victim, ref damage, ref DoneFlatBenefit, ref DoneTotalMod);