aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-08-31 15:58:34 -0700
committerNay <dnpd.dd@gmail.com>2012-08-31 15:58:34 -0700
commit6b0c2a307b9f6e388dcb831986cdaa8e4a497364 (patch)
tree0871b3ff19a138fe42cfe38f34301c8640cb99f0 /src
parent305b8d2d69f28fb0094c80c579c36b029c474cb1 (diff)
parent74d4aec49bd6e571c3253922e88ace19fe68bbe1 (diff)
Merge pull request #7599 from gacko28/zuluhed
Core/Spell: Unlocking zuluhed chains Closes #996 Fixes quest Zuluhed the Whacked
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index c79bf74aab6..d425bf6b857 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -1868,9 +1868,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 +1921,5 @@ void AddSC_shadowmoon_valley()
new mob_illidari_spawn();
new mob_torloth_the_magnificent();
new npc_enraged_spirit();
+ new spell_unlocking_zuluheds_chains();
}