diff options
author | QAston <qaston@gmail.com> | 2011-05-29 13:18:47 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-05-29 13:18:47 +0200 |
commit | 42a20f14efd4ceede6839d7baa5ab268a06b49d4 (patch) | |
tree | da4e9b39c78638f508e4de88e568423702ee7e9e /src/server/scripts/Examples | |
parent | b2096c711ee0440c957b1fe7d12ccf2550725c98 (diff) |
Core/Auras: Use existing aura object on aura reapply/stack increase instead of creating a new one.
You can hook on reapply/stack event by checking for AURA_EFFECT_HANDLE_REAPPLY aura handler mode, AURA_EFFECT_HANDLE_REAL is now not triggered on aura refresh/stack.
Diffstat (limited to 'src/server/scripts/Examples')
-rw-r--r-- | src/server/scripts/Examples/example_spell.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 22dc9adea37..212c6d767bd 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -259,7 +259,8 @@ class spell_ex_66244 : public SpellScriptLoader { OnEffectApply += AuraEffectApplyFn(spell_ex_66244AuraScript::HandleOnEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectRemove += AuraEffectRemoveFn(spell_ex_66244AuraScript::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); - AfterEffectApply += AuraEffectApplyFn(spell_ex_66244AuraScript::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + // AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK - makes handler to be called when aura is reapplied on target + AfterEffectApply += AuraEffectApplyFn(spell_ex_66244AuraScript::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); AfterEffectRemove += AuraEffectRemoveFn(spell_ex_66244AuraScript::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_ex_66244AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_DUMMY); OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_ex_66244AuraScript::HandleEffectPeriodicUpdate, EFFECT_0, SPELL_AURA_DUMMY); |