aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp50
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp82
2 files changed, 132 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 63ba44f19e8..532ede3f849 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -24,6 +24,7 @@
#include "SpellScript.h"
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
+#include "Vehicle.h"
/*####
## npc_drakuru_shackles
@@ -1814,6 +1815,54 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader
}
};
+enum StormCloud
+{
+ STORM_COULD = 29939,
+ HEALING_WINDS = 55549,
+ STORM_VISUAL = 55708,
+ GYMERS_GRAB = 55516,
+ RIDE_VEHICLE = 43671
+};
+
+class npc_storm_cloud : public CreatureScript
+{
+public:
+ npc_storm_cloud() : CreatureScript("npc_storm_cloud") { }
+
+ struct npc_storm_cloudAI : public ScriptedAI
+ {
+ npc_storm_cloudAI(Creature* creature) : ScriptedAI(creature) {}
+
+ void Reset() OVERRIDE
+ {
+ me->CastSpell(me, STORM_VISUAL, true);
+ }
+
+ void JustRespawned() OVERRIDE
+ {
+ Reset();
+ }
+
+ void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
+ {
+ if (spell->Id != GYMERS_GRAB)
+ return;
+
+ if (Vehicle* veh = caster->GetVehicleKit())
+ if (veh->GetAvailableSeatCount() != 0)
+ {
+ me->CastSpell(caster, RIDE_VEHICLE, true);
+ me->CastSpell(caster, HEALING_WINDS, true);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_storm_cloudAI(creature);
+ }
+};
+
void AddSC_zuldrak()
{
new npc_drakuru_shackles();
@@ -1834,4 +1883,5 @@ void AddSC_zuldrak()
new spell_random_ingredient();
new spell_pot_check();
new spell_fetch_ingredient_aura();
+ new npc_storm_cloud();
}
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();
}