aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 6b56c51d6e1..3d84d9bbca9 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2161,6 +2161,86 @@ class spell_q12619_emblazon_runeblade_effect : public SpellScriptLoader
}
};
+enum Quest_The_Storm_King
+{
+ SPELL_RIDE_GYMER = 43671,
+ SPELL_GRABBED = 55424
+};
+
+class spell_q12919_gymers_grab : public SpellScriptLoader
+{
+ public:
+ spell_q12919_gymers_grab() : SpellScriptLoader("spell_q12919_gymers_grab") { }
+
+ class spell_q12919_gymers_grab_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q12919_gymers_grab_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_RIDE_GYMER))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ int8 seatId = 2;
+ if (!GetHitCreature())
+ return;
+ GetHitCreature()->CastCustomSpell(SPELL_RIDE_GYMER, SPELLVALUE_BASE_POINT0, seatId, GetCaster(), true);
+ GetHitCreature()->CastSpell(GetHitCreature(), SPELL_GRABBED, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q12919_gymers_grab_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q12919_gymers_grab_SpellScript();
+ }
+};
+
+enum Quest_The_Storm_King_Throw
+{
+ SPELL_VARGUL_EXPLOSION = 55569
+};
+
+class spell_q12919_gymers_throw : public SpellScriptLoader
+{
+ public:
+ spell_q12919_gymers_throw() : SpellScriptLoader("spell_q12919_gymers_throw") { }
+
+ class spell_q12919_gymers_throw_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q12919_gymers_throw_SpellScript);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(1))
+ {
+ passenger->ExitVehicle();
+ caster->CastSpell(passenger, SPELL_VARGUL_EXPLOSION, true);
+ }
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q12919_gymers_throw_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q12919_gymers_throw_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2213,4 +2293,6 @@ void AddSC_quest_spell_scripts()
new spell_q12641_death_comes_from_on_high();
new spell_q12619_emblazon_runeblade();
new spell_q12619_emblazon_runeblade_effect();
+ new spell_q12919_gymers_grab();
+ new spell_q12919_gymers_throw();
}