diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/zone_grizzly_hills.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 9ea3023de01..44f87930f59 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -20,6 +20,7 @@ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "Spell.h" #include "SpellInfo.h" #include "CreatureTextMgr.h" @@ -749,6 +750,43 @@ public: } }; +enum ShredderDelivery +{ + NPC_BROKEN_DOWN_SHREDDER = 27354 +}; + +class spell_shredder_delivery : public SpellScriptLoader +{ + public: + spell_shredder_delivery() : SpellScriptLoader("spell_shredder_delivery") { } + + class spell_shredder_delivery_SpellScript : public SpellScript + { + PrepareSpellScript(spell_shredder_delivery_SpellScript); + + bool Load() OVERRIDE + { + return GetCaster()->GetTypeId() == TYPEID_UNIT; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (GetCaster()->ToCreature()->GetEntry() == NPC_BROKEN_DOWN_SHREDDER) + GetCaster()->ToCreature()->DespawnOrUnsummon(); + } + + void Register() OVERRIDE + { + OnEffectHitTarget += SpellEffectFn(spell_shredder_delivery_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_shredder_delivery_SpellScript(); + } +}; + void AddSC_grizzly_hills() { new npc_emily(); @@ -759,4 +797,5 @@ void AddSC_grizzly_hills() new npc_wounded_skirmisher(); new npc_venture_co_straggler(); new npc_lake_frog(); + new spell_shredder_delivery(); } |