Core/Misc: Fixed resistance calculate for Mutated Transformation and Twilight Bloodbolt (#24717)

Ref: 9f7b464a6a
- Implemented a new SpellScript hook that allow control Resistance/Absorb amount of a damage spell.

(cherry picked from commit d81a9e5bc3)
This commit is contained in:
Keader
2020-06-03 22:05:08 -03:00
committed by Shauren
parent 9286734b55
commit 4110a06e81
10 changed files with 90 additions and 26 deletions

View File

@@ -191,6 +191,16 @@ SpellCastResult SpellScript::CheckCastHandler::Call(SpellScript* spellScript)
return (spellScript->*_checkCastHandlerScript)();
}
SpellScript::OnCalculateResistAbsorbHandler::OnCalculateResistAbsorbHandler(SpellOnResistAbsorbCalculateFnType onResistAbsorbCalculateHandlerScript)
{
pOnCalculateResistAbsorbHandlerScript = onResistAbsorbCalculateHandlerScript;
}
void SpellScript::OnCalculateResistAbsorbHandler::Call(SpellScript* spellScript, DamageInfo const& damageInfo, uint32& resistAmount, int32& absorbAmount)
{
return (spellScript->*pOnCalculateResistAbsorbHandlerScript)(damageInfo, resistAmount, absorbAmount);
}
SpellScript::EffectHandler::EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: _SpellScript::EffectNameCheck(_effName), _SpellScript::EffectHook(_effIndex)
{