diff options
author | Nay <dnpd.dd@gmail.com> | 2012-09-01 22:20:33 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-09-01 22:20:33 +0100 |
commit | ffe8c75f17aa4c4059771265dd408055cb3c4e52 (patch) | |
tree | 94cadbcea5b6f69224550a24f2b5a9791f17447d /src/server/scripts | |
parent | a8d514914be2e88dbae5013a17013adabefcfe74 (diff) | |
parent | a7dd289b04e3a9d0337fb5b6db3fc7a70f670933 (diff) |
Merge remote-tracking branch 'origin/master' into mmaps
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Outland/shadowmoon_valley.cpp | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index c79bf74aab6..1656f7221ed 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -45,6 +45,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Group.h" +#include "SpellScript.h" /*##### # mob_mature_netherwing_drake @@ -1868,9 +1869,41 @@ public: }; }; -/*##### -# -######*/ +enum ZuluhedChains +{ + QUEST_ZULUHED = 10866, + NPC_KARYNAKU = 22112, +}; + +class spell_unlocking_zuluheds_chains : public SpellScriptLoader +{ + public: + spell_unlocking_zuluheds_chains() : SpellScriptLoader("spell_unlocking_zuluheds_chains") { } + + class spell_unlocking_zuluheds_chains_SpellScript : public SpellScript + { + PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript); + + void HandleOnCast() + { + // FIXME: Hackish solution, a better way to reward killcredit should be found + if (Unit* caster = GetCaster()) + if(Player* player = caster->ToPlayer()) + if (player->GetQuestStatus(QUEST_ZULUHED) == QUEST_STATUS_INCOMPLETE) + player->CastedCreatureOrGO(NPC_KARYNAKU, MAKE_NEW_GUID(0, NPC_KARYNAKU, HIGHGUID_UNIT), 0); + } + + void Register() + { + OnCast += SpellCastFn(spell_unlocking_zuluheds_chains_SpellScript::HandleOnCast); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_unlocking_zuluheds_chains_SpellScript(); + } +}; void AddSC_shadowmoon_valley() { @@ -1889,4 +1922,5 @@ void AddSC_shadowmoon_valley() new mob_illidari_spawn(); new mob_torloth_the_magnificent(); new npc_enraged_spirit(); + new spell_unlocking_zuluheds_chains(); } |