aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_06_27_00_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp34
2 files changed, 36 insertions, 1 deletions
diff --git a/sql/updates/world/2012_06_27_00_world_spell_script_names.sql b/sql/updates/world/2012_06_27_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..8210225de6e
--- /dev/null
+++ b/sql/updates/world/2012_06_27_00_world_spell_script_names.sql
@@ -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');
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 810cc20e04b..2f6989b57c9 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -639,7 +639,7 @@ class spell_q12851_going_bearback : public SpellScriptLoader
// Already in fire
if (target->HasAura(SPELL_ABLAZE))
return;
-
+
if (Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself())
{
switch (target->GetEntry())
@@ -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();