diff options
author | QAston <qaston@gmail.com> | 2011-05-25 17:13:32 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-05-25 17:13:32 +0200 |
commit | a1b8fd2054eb705f32dea20fa27ded4624e49f57 (patch) | |
tree | b7be2d4ddfc5cefcaa24fa4163f5e901b58ff19d /src/server/game/Spells/SpellScript.h | |
parent | 6c4d2c8332d16bc210d2b75f4b900451eedfc487 (diff) |
Core/AuraScripts: Add AfterEffectRemove and AfterEffectApply hooks, to allow safe triggering of spellcasts or other actions which may call linked events while OnEffectApply and OnEffectRemove are still there for overriding the way effect is handled on target.
Diffstat (limited to 'src/server/game/Spells/SpellScript.h')
-rwxr-xr-x | src/server/game/Spells/SpellScript.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 68b6f987169..ffd462c9507 100755 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -461,15 +461,25 @@ class AuraScript : public _SpellScript // hooks to which you can attach your functions // // executed when aura effect is applied with specified mode to target + // should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe // example: OnEffectApply += AuraEffectApplyFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); // where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode); HookList<EffectApplyHandler> OnEffectApply; + // executed after aura effect is applied with specified mode to target + // example: AfterEffectApply += AuraEffectApplyFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); + // where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode); + HookList<EffectApplyHandler> AfterEffectApply; #define AuraEffectApplyFn(F, I, N, M) EffectApplyHandlerFunction(&F, I, N, M) - // executed when aura effect is removed with specified mode from target + // executed after aura effect is removed with specified mode from target + // should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe // example: OnEffectRemove += AuraEffectRemoveFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); // where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode); HookList<EffectApplyHandler> OnEffectRemove; + // executed when aura effect is removed with specified mode from target + // example: AfterEffectRemove += AuraEffectRemoveFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); + // where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode); + HookList<EffectApplyHandler> AfterEffectRemove; #define AuraEffectRemoveFn(F, I, N, M) EffectApplyHandlerFunction(&F, I, N, M) // executed when periodic aura effect ticks on target |