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:
@@ -89,7 +89,7 @@ namespace Scripts.Shadowlands.Torghast
|
||||
[Script] // 305060 - Yel'Shir's Powerglove
|
||||
class spell_torghast_yelshirs_powerglove : SpellScript
|
||||
{
|
||||
void CalculateDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
SpellInfo triggeringSpell = GetTriggeringSpell();
|
||||
if (triggeringSpell != null)
|
||||
|
||||
@@ -435,7 +435,7 @@ namespace Scripts.Spells.Azerite
|
||||
return ValidateSpellEffect((SpellEchoingBladesTrait, 2));
|
||||
}
|
||||
|
||||
void CalculateDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
AuraEffect trait = GetCaster().GetAuraEffect(SpellEchoingBladesTrait, 2);
|
||||
if (trait != null)
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Scripts.Spells.Evoker
|
||||
&& spellInfo.GetEffect(2).IsAura(AuraType.ModSilence); // validate we are removing the correct effect
|
||||
}
|
||||
|
||||
void AddBonusUpfrontDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void AddBonusUpfrontDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
int empowerLevel = (int)GetSpell().m_customArg;
|
||||
if (empowerLevel == 0)
|
||||
|
||||
@@ -942,7 +942,7 @@ namespace Scripts.Spells.Generic
|
||||
[Script] // 64208 - Consumption
|
||||
class spell_gen_consumption : SpellScript
|
||||
{
|
||||
void CalculateDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
SpellInfo createdBySpell = SpellMgr.GetSpellInfo(GetCaster().m_unitData.CreatedBySpell, GetCastDifficulty());
|
||||
if (createdBySpell != null)
|
||||
@@ -5100,7 +5100,7 @@ namespace Scripts.Spells.Generic
|
||||
);
|
||||
}
|
||||
|
||||
void CalculateHealingBonus(Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
void CalculateHealingBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
MathFunctions.AddPct(ref pctMod, MajorPlayerHealingCooldownHelpers.GetBonusMultiplier(GetCaster(), GetSpellInfo().Id));
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ namespace Scripts.Spells.Priest
|
||||
return ValidateSpellEffect((SpellIds.AbyssalReverie, 0));
|
||||
}
|
||||
|
||||
void CalculateHealingBonus(Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
void CalculateHealingBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
spell_pri_atonement.TriggerArgs args = (spell_pri_atonement.TriggerArgs)GetSpell().m_customArg;
|
||||
if (args == null || (args.DamageSchoolMask & SpellSchoolMask.Shadow) == 0)
|
||||
@@ -919,7 +919,7 @@ namespace Scripts.Spells.Priest
|
||||
&& ValidateSpellEffect((SpellIds.DivineService, 0));
|
||||
}
|
||||
|
||||
void CalculateHealingBonus(Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
void CalculateHealingBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
AuraEffect divineServiceEffect = GetCaster().GetAuraEffect(SpellIds.DivineService, 0);
|
||||
if (divineServiceEffect != null)
|
||||
@@ -1183,7 +1183,7 @@ namespace Scripts.Spells.Priest
|
||||
return ValidateSpellEffect((SpellIds.FocusedMending, 0));
|
||||
}
|
||||
|
||||
void CalculateHealingBonus(Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
void CalculateHealingBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
AuraEffect focusedMendingEffect = GetCaster().GetAuraEffect(SpellIds.FocusedMending, 0);
|
||||
if (focusedMendingEffect != null)
|
||||
@@ -1574,7 +1574,7 @@ namespace Scripts.Spells.Priest
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateDamageBonus(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamageBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
Aura atonement = GetCaster().GetAura(SpellIds.Atonement);
|
||||
if (atonement == null)
|
||||
@@ -1680,7 +1680,7 @@ namespace Scripts.Spells.Priest
|
||||
_damageIncrease = mindDevourer.GetAmount();
|
||||
}
|
||||
|
||||
void CalculateDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
MathFunctions.AddPct(ref pctMod, _damageIncrease);
|
||||
}
|
||||
@@ -1966,7 +1966,7 @@ namespace Scripts.Spells.Priest
|
||||
return ValidateSpellInfo(SpellIds.PowerOfTheDarkSide);
|
||||
}
|
||||
|
||||
void CalculateDamageBonus(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamageBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
AuraEffect powerOfTheDarkSide = GetCaster().GetAuraEffect(SpellIds.PowerOfTheDarkSide, 0);
|
||||
if (powerOfTheDarkSide != null)
|
||||
@@ -1988,7 +1988,7 @@ namespace Scripts.Spells.Priest
|
||||
return ValidateSpellInfo(SpellIds.PowerOfTheDarkSide);
|
||||
}
|
||||
|
||||
void CalculateHealingBonus(Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
void CalculateHealingBonus(SpellEffectInfo spellEffectInfo, Unit victim, ref int healing, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
AuraEffect powerOfTheDarkSide = GetCaster().GetAuraEffect(SpellIds.PowerOfTheDarkSide, 0);
|
||||
if (powerOfTheDarkSide != null)
|
||||
@@ -3003,7 +3003,7 @@ namespace Scripts.Spells.Priest
|
||||
&& ValidateSpellEffect((spellInfo.Id, 4));
|
||||
}
|
||||
|
||||
void HandleDamageCalculation(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void HandleDamageCalculation(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
if (victim.HealthBelowPct(GetEffectInfo(1).CalcValue(GetCaster())))
|
||||
MathFunctions.AddPct(ref pctMod, GetEffectInfo(2).CalcValue(GetCaster()));
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace Scripts.Spells.Rogue
|
||||
[Script] // 32645 - Envenom
|
||||
class spell_rog_envenom : SpellScript
|
||||
{
|
||||
void CalculateDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
pctMod *= GetSpell().GetPowerTypeCostAmount(PowerType.ComboPoints).GetValueOrDefault(0);
|
||||
|
||||
@@ -311,7 +311,7 @@ namespace Scripts.Spells.Rogue
|
||||
[Script] // 196819 - Eviscerate
|
||||
class spell_rog_eviscerate : SpellScript
|
||||
{
|
||||
void CalculateDamage(Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
void CalculateDamage(SpellEffectInfo spellEffectInfo, Unit victim, ref int damage, ref int flatMod, ref float pctMod)
|
||||
{
|
||||
pctMod *= GetSpell().GetPowerTypeCostAmount(PowerType.ComboPoints).GetValueOrDefault(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user