diff options
| author | Subv <s.v.h21@hotmail.com> | 2012-10-20 07:07:21 -0700 |
|---|---|---|
| committer | Subv <s.v.h21@hotmail.com> | 2012-10-20 07:07:21 -0700 |
| commit | 14adb5bcac6dff4f9cd81e9f34d9c0c5c62de178 (patch) | |
| tree | ad580969e4d509956ff62a6f46e0366ec1214e4f /src | |
| parent | 2f4d7fc8e8e91f952c5176614a8ba131ec01a111 (diff) | |
| parent | ae199b48393ee670ed00c7a3350f468228ec31b9 (diff) | |
Merge pull request #8134 from Gacko/q2987
Core/DB: Quest 'Gordunni Cobalt'
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Kalimdor/feralas.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index 4fcd20951c9..c1e247044f7 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" +#include "SpellScript.h" /*###### ## npc_gregan_brewspewer @@ -202,6 +203,39 @@ public: }; +enum GordunniTrap +{ + GO_GORDUNNI_DIRT_MOUND = 144064, +}; + +class spell_gordunni_trap : public SpellScriptLoader +{ + public: + spell_gordunni_trap() : SpellScriptLoader("spell_gordunni_trap") { } + + class spell_gordunni_trap_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gordunni_trap_SpellScript); + + void HandleDummy() + { + if (Unit* caster = GetCaster()) + if (GameObject* chest = caster->SummonGameObject(GO_GORDUNNI_DIRT_MOUND, caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0)) + chest->SetSpellId(GetSpellInfo()->Id); + } + + void Register() + { + OnCast += SpellCastFn(spell_gordunni_trap_SpellScript::HandleDummy); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gordunni_trap_SpellScript(); + } +}; + /*###### ## AddSC ######*/ @@ -211,4 +245,5 @@ void AddSC_feralas() new npc_gregan_brewspewer(); new npc_oox22fe(); new npc_screecher_spirit(); + new spell_gordunni_trap(); } |
