diff options
| author | Kirkhammett <boev.filip@gmail.com> | 2013-09-27 12:50:34 +0200 |
|---|---|---|
| committer | Kirkhammett <boev.filip@gmail.com> | 2013-09-27 12:50:34 +0200 |
| commit | 89085f7d577be8361ddfb879a913f96e87c966aa (patch) | |
| tree | 4396f79b30fe4be4e8176f17c10b7770e2aa4681 /src/server/scripts/Northrend | |
| parent | 2cca3982d4dd87be452ab13332dd809e02d2a24b (diff) | |
DB/Core: The Storm King's Vengeance
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/zone_zuldrak.cpp | 50 |
1 files changed, 50 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(); } |
