aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Examples
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2010-12-30 19:11:36 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2010-12-30 19:11:36 +0100
commitfe8c8932734cb32592ebb2f967b2cf21dd8c08ea (patch)
treed8e3d62e5455cce3e83225390d0e6fb394f2e938 /src/server/scripts/Examples
parent948a2136c439c7cbc2a75c2e642bead75e2c80c8 (diff)
parent8cd2c73e454d81899f400f291a3ea8f91c0cfae7 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore
Diffstat (limited to 'src/server/scripts/Examples')
-rw-r--r--src/server/scripts/Examples/example_spell.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 2a9d9a605c4..a62c53e413a 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -268,10 +268,9 @@ class spell_ex_66244 : public SpellScriptLoader
{
return new spell_ex_66244AuraScript();
}
-
-
};
+// example usage of OnEffectAbsorb and AfterEffectAbsorb hooks
class spell_ex_absorb_aura : public SpellScriptLoader
{
public:
@@ -297,17 +296,11 @@ class spell_ex_absorb_aura : public SpellScriptLoader
sLog->outString("Our aura has absorbed %u damage!", absorbAmount);
}
- /*void HandleAfterAbsorb(DamageInfo & dmgInfo)
- {
- sLog->outString("Our auras have just absorbed damage done to us!");
- }*/
-
// function registering
void Register()
{
OnEffectAbsorb += AuraEffectAbsorbFn(spell_ex_absorb_auraAuraScript::HandleOnEffectAbsorb, EFFECT_0);
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_ex_absorb_auraAuraScript::HandleAfterEffectAbsorb, EFFECT_0);
- //AfterAbsorb += AuraAbsorbFn(spell_ex_absorb_auraAuraScript::HandleAfterAbsorb);
}
};
@@ -318,6 +311,8 @@ class spell_ex_absorb_aura : public SpellScriptLoader
}
};
+// example usage of OnEffectManaShield and AfterEffectManaShield hooks
+// see spell_ex_absorb_aura, these hooks work the same as OnEffectAbsorb and AfterEffectAbsorb
// this function has to be added to function set in ScriptLoader.cpp
void AddSC_example_spell_scripts()