Scripts/Spells: Corrected Riptide script, preparing variable should be done in Load hook, not Register

This commit is contained in:
Shauren
2012-04-09 10:58:20 +02:00
parent fe5a5de0f7
commit bfc73920c7
+8 -4
View File
@@ -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