diff options
| author | Shocker <shocker@freakz.ro> | 2011-06-12 19:46:33 +0300 |
|---|---|---|
| committer | Shocker <shocker@freakz.ro> | 2011-06-12 19:46:33 +0300 |
| commit | 13b34a5d7231a93d78b36416d2a32ef6457a0473 (patch) | |
| tree | a3306cc5205311caf63fd931607d672c82b33a57 /src | |
| parent | d277ecc26a98144a0697257b6505acc68f802f2a (diff) | |
Scripts/Quests: Implement quest 12659 (Scalps!)
Thanks Malcrom for condition
Closes #917
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 75cb838b1c0..2d926118ed2 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -816,6 +816,47 @@ public: }; }; +// http://www.wowhead.com/quest=12659 Scalps! +// 52090 Ahunae's Knife +enum eQuest12659Data +{ + NPC_SCALPS_KC_BUNNY = 28622, +}; + +class spell_q12659_ahunaes_knife : public SpellScriptLoader +{ +public: + spell_q12659_ahunaes_knife() : SpellScriptLoader("spell_q12659_ahunaes_knife") { } + + class spell_q12659_ahunaes_knife_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Player* caster = GetCaster()->ToPlayer(); + if (!caster) + return; + + if (Creature* target = GetTargetUnit()->ToCreature()) + { + target->ForcedDespawn(); + caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY, 0); + } + } + + void Register() + { + OnEffect += SpellEffectFn(spell_q12659_ahunaes_knife_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q12659_ahunaes_knife_SpellScript(); + }; +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -835,4 +876,5 @@ void AddSC_quest_spell_scripts() new spell_q12937_relief_for_the_fallen(); new spell_q10041_q10040_who_are_they(); new spell_symbol_of_life_dummy(); + new spell_q12659_ahunaes_knife(); } |
