From bfc73920c72c1a5ee60ea5cddf9197dd80d5a3e6 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 9 Apr 2012 10:58:20 +0200 Subject: Scripts/Spells: Corrected Riptide script, preparing variable should be done in Load hook, not Register --- src/server/scripts/Spells/spell_shaman.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 5b5a48f33af..1a0f4576fea 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -552,6 +552,13 @@ class spell_sha_chain_heal : public SpellScriptLoader { PrepareSpellScript(spell_sha_chain_heal_SpellScript); + bool Load() + { + firstHeal = true; + riptide = false; + return true; + } + void HandleHeal(SpellEffIndex /*effIndex*/) { if (firstHeal) @@ -573,13 +580,10 @@ class spell_sha_chain_heal : public SpellScriptLoader void Register() { OnEffectHitTarget += SpellEffectFn(spell_sha_chain_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL); - firstHeal = true; - riptide = false; } - + bool firstHeal; bool riptide; - }; SpellScript* GetSpellScript() const -- cgit v1.2.3