Core/Spells: correctly award kill credit for quest the focus on the beach.

This commit is contained in:
Kandera
2012-06-27 15:04:07 -04:00
parent b9860aa71a
commit 551878ad96
2 changed files with 36 additions and 1 deletions
@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (50546);
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(50546,'spell_q12066_bunny_kill_credit');
+32
View File
@@ -1162,6 +1162,38 @@ class spell_q12277_wintergarde_mine_explosion : public SpellScriptLoader
}
};
enum FocusOnTheBeach
{
SPELL_BUNNY_CREDIT_BEAM = 47390,
};
class spell_q12066_bunny_kill_credit : public SpellScriptLoader
{
public:
spell_q12066_bunny_kill_credit() : SpellScriptLoader("spell_q12066_bunny_kill_credit") { }
class spell_q12066_bunny_kill_credit_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q12066_bunny_kill_credit_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Creature* target = GetHitCreature())
target()->CastSpell(GetCaster(), SPELL_BUNNY_CREDIT_BEAM, false);
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_q12066_bunny_kill_credit_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_q12066_bunny_kill_credit_SpellScript();
}
};
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();