diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-08-02 00:12:16 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-08-02 00:12:16 +0200 |
| commit | 8594fcfe8a0085a087bce510e3b4cb14f632434f (patch) | |
| tree | 67eb3e764b43c3c64fc3bba86f0607f6f8384c8b /src/server/scripts/Shadowlands | |
| parent | 9cdf3530f41e18fc815e7b164e40c01a18c3d757 (diff) | |
Scripts/Spells: Converted some damage calculating scripts to use new hooks as examples
Diffstat (limited to 'src/server/scripts/Shadowlands')
| -rw-r--r-- | src/server/scripts/Shadowlands/Torghast/spell_torghast.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Shadowlands/Torghast/spell_torghast.cpp b/src/server/scripts/Shadowlands/Torghast/spell_torghast.cpp index f1911ac9c53..adbcbe4b4d9 100644 --- a/src/server/scripts/Shadowlands/Torghast/spell_torghast.cpp +++ b/src/server/scripts/Shadowlands/Torghast/spell_torghast.cpp @@ -102,16 +102,16 @@ class spell_torghast_touch_of_the_unseen : public AuraScript // 305060 - Yel'Shir's Powerglove class spell_torghast_yelshirs_powerglove : public SpellScript { - void HandleEffect(SpellEffIndex /*effIndex*/) + void CalculateDamage(Unit const* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const { if (SpellInfo const* triggeringSpell = GetTriggeringSpell()) if (Aura const* triggerAura = GetCaster()->GetAura(triggeringSpell->Id)) - SetEffectValue(GetEffectValue() * triggerAura->GetStackAmount()); + pctMod *= triggerAura->GetStackAmount(); } void Register() override { - OnEffectLaunchTarget += SpellEffectFn(spell_torghast_yelshirs_powerglove::HandleEffect, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + CalcDamage += SpellCalcDamageFn(spell_torghast_yelshirs_powerglove::CalculateDamage); } }; @@ -313,7 +313,7 @@ class spell_torghast_potent_potion_calc : public SpellScript void SetValue(SpellEffIndex effIndex) { SetEffectValue(sSpellMgr->AssertSpellInfo(SPELL_LABEL_SPIRITUAL_REJUVENATION_POTION, GetCastDifficulty())->GetEffect(effIndex) - .CalcValue(GetCaster(), nullptr, GetHitUnit()));; + .CalcValue(GetCaster(), nullptr, GetHitUnit())); } void Register() override |
