diff options
author | Nyr <nyrdeveloper@gmail.com> | 2022-07-25 19:38:42 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-07-28 21:26:48 +0200 |
commit | 44236c70787eae0239fb636e217305dfa043bf71 (patch) | |
tree | f309905195b591feabd5f009d83005fb69b68b26 /src/server/game/Spells/SpellScript.cpp | |
parent | 51166b2c5e02910728f897ff481ea6ee83a9310c (diff) |
Core/Spells: Implement OnEffectAbsorbHeal and AfterEffectAbsorbHeal hooks
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r-- | src/server/game/Spells/SpellScript.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 100ea02fbe5..772426ae5ed 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -1164,11 +1164,22 @@ AuraScript::EffectAbsorbHandler::EffectAbsorbHandler(EffectAbsorbHandler&& right AuraScript::EffectAbsorbHandler& AuraScript::EffectAbsorbHandler::operator=(EffectAbsorbHandler&& right) noexcept = default; AuraScript::EffectAbsorbHandler::~EffectAbsorbHandler() = default; +AuraScript::EffectAbsorbHealHandler::EffectAbsorbHealHandler(AuraEffectAbsorbHealFnType _pEffectHandlerScript, uint8 _effIndex) + : AuraScript::EffectBase(_effIndex, SPELL_AURA_SCHOOL_HEAL_ABSORB) +{ + pEffectHandlerScript = _pEffectHandlerScript; +} + void AuraScript::EffectAbsorbHandler::Call(AuraScript* auraScript, AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount) { (auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, absorbAmount); } +void AuraScript::EffectAbsorbHealHandler::Call(AuraScript * auraScript, AuraEffect * aurEff, HealInfo & healInfo, uint32 & absorbAmount) +{ + (auraScript->*pEffectHandlerScript)(aurEff, healInfo, absorbAmount); +} + AuraScript::EffectManaShieldHandler::EffectManaShieldHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectBase(_effIndex, SPELL_AURA_MANA_SHIELD), pEffectHandlerScript(_pEffectHandlerScript) { |