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.
This commit is contained in:
Keader
2020-06-03 22:05:08 -03:00
committed by GitHub
parent adc7cd3cee
commit d81a9e5bc3
10 changed files with 96 additions and 29 deletions

View File

@@ -199,6 +199,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)
{