Core/Unit: Move spell specific code from Unit::CalcAbsorbResist to AuraScripts.
This commit is contained in:
@@ -283,6 +283,7 @@ enum AuraScriptHookType
|
||||
AURA_SCRIPT_HOOK_EFFECT_CALC_PERIODIC,
|
||||
AURA_SCRIPT_HOOK_EFFECT_CALC_SPELLMOD,
|
||||
AURA_SCRIPT_HOOK_EFFECT_ABSORB,
|
||||
AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB,
|
||||
/*AURA_SCRIPT_HOOK_APPLY,
|
||||
AURA_SCRIPT_HOOK_REMOVE,*/
|
||||
};
|
||||
@@ -447,6 +448,12 @@ class AuraScript : public _SpellScript
|
||||
HookList<EffectAbsorbHandler> OnEffectAbsorb;
|
||||
#define AuraEffectAbsorbFn(F, I) EffectAbsorbFunction(&F, I)
|
||||
|
||||
// executed after absorb aura effect to reduced damage to target - absorbAmount is real amount absorbed by aura
|
||||
// example: OnEffectAbsorb += AuraEffectAbsorbFn(class::function, EffectIndexSpecifier);
|
||||
// where function is: void function (AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount);
|
||||
HookList<EffectAbsorbHandler> AfterEffectAbsorb;
|
||||
#define AuraEffectAbsorbFn(F, I) EffectAbsorbFunction(&F, I)
|
||||
|
||||
// executed after aura absorbtions reduced damage
|
||||
// example: AfterAbsorb += AuraAbsorbFn(class::function);
|
||||
// where function is: void function (AuraEffect * aurEff, DamageInfo & dmgInfo);
|
||||
|
||||
Reference in New Issue
Block a user