aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-09-25 13:29:17 +0200
committerQAston <qaston@gmail.com>2011-09-25 13:29:50 +0200
commite949ad3adbfe22c11ec4d731b0fcfb9cc284f064 (patch)
tree62ae43a852fac7d879e1b9dcc53b9facbb8f6a7c /src/server/scripts/World
parentb07cc3751f46d3bc848b7d1c3f5b350c7be084ee (diff)
Core/Spells: spell effect handling improvements
* Call spell effect handlers in 4 modes: - SPELL_EFFECT_HANDLE_LAUNCH - called when spell is launched (cast just finished) - SPELL_EFFECT_HANDLE_LAUNCH_TARGET - called when spell is launched for each target in spell target map - SPELL_EFFECT_HANDLE_HIT - called when spell hits its destination - SPELL_EFFECT_HANDLE_HIT_TARGET - called when spell hits it's target from spell target map *Correctly implement SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL *Remove spell system hacks which became obsolete with this commit Core/SpellScripts: add OnEffectLaunch, OnEffectLaunchTarget, OnEffectHit, OnEffectHitTarget hooks for new effect handle modes and remove OnEffect hook. A generic rule of thumb how to update your scripts (will work for nearly all cases) for spell system noobs: if your spell script used GetHitXXXX function, you need to use OnEffectHitTarget, otherwise use OnEffectHit
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/boss_emerald_dragons.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp
index bd058ad25bf..b6030c62df4 100644
--- a/src/server/scripts/World/boss_emerald_dragons.cpp
+++ b/src/server/scripts/World/boss_emerald_dragons.cpp
@@ -306,7 +306,7 @@ class spell_mark_of_nature : public SpellScriptLoader
void Register()
{
OnUnitTargetSelect += SpellUnitTargetFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
- OnEffect += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};