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
+3 -3
View File
@@ -164,7 +164,7 @@ namespace Game.Scripting
// internal use classes & functions
// DO NOT OVERRIDE THESE IN SCRIPTS
public delegate SpellCastResult SpellCheckCastFnType();
public delegate void DamageAndHealingCalcFnType(Unit victim, ref int damageOrHealing, ref int flatMod, ref float pctMod);
public delegate void DamageAndHealingCalcFnType(SpellEffectInfo spellEffectInfo, Unit victim, ref int damageOrHealing, ref int flatMod, ref float pctMod);
public delegate void SpellOnResistAbsorbCalculateFnType(DamageInfo damageInfo, ref uint resistAmount, ref int absorbAmount);
public delegate void SpellEffectFnType(uint index);
public delegate void SpellBeforeHitFnType(SpellMissInfo missInfo);
@@ -212,9 +212,9 @@ namespace Game.Scripting
_callImpl = handler;
}
public void Call(Unit victim, ref int damageOrHealing, ref int flatMod, ref float pctMod)
public void Call(SpellEffectInfo spellEffectInfo, Unit victim, ref int damageOrHealing, ref int flatMod, ref float pctMod)
{
_callImpl(victim, ref damageOrHealing, ref flatMod, ref pctMod);
_callImpl(spellEffectInfo, victim, ref damageOrHealing, ref flatMod, ref pctMod);
}
}